-
Bug
-
Resolution: Not a bug
-
High
-
18
-
Severity 3 - Minor
-
4
-
Issue Summary
Team-managed and Company-managaed projects work differently. Team-managed projects cannot share resources with other projects, specially when it come to fields.
You can end up having a field in a Team-managed project with the same name of a global field (used by Company-managed projects). Currently, that seems to cause inconsitencies in the search results.
Steps to Reproduce
Consider the following scenario:
- Create a field called Select list
- Create a field of the same type and name in a team-managed project
- Create an issue RU-113 in a Company-managed project, and populate the field Select list
- Move that issue to a Team-managed project, but do not populate any value for the field Select list that belongs to that project:
- The new key of that issue in my case is N1-93
Scenario 1 Now, let's check the search results:
- Create an issue in that same Team-managed project, populating the field Select list present on it
- The UI suggests only one field named after Select list
- Search for both the issue you moved to the Team-managed project and the one you have created
- Add the column Select list (only one is offered) in the search results
Scenario 2:
- Perform a REST API call with the search endpoint, expanding both fields in the results
- In my case, the global field's ID is 10143, and the Team-managed one is 10225
https://unlimitedjiraworks.atlassian.net/rest/api/2/search?jql=key%20%3D%20N1-93&fields=customfield_10143,%20customfield_10225
Expected Results
Scenario 1:
- Only the issue you have created along with a value for the field in the project should display a value in the colum Select list
Scenario 2:
- Only the field with ID 10225 should be considered for the results since that's in the project's scope
Actual Results
Scenario 1:
- Both issues display a value for the field Select list. The problem is that in this case the issue that was moved to the project (N1-93) is pointing to the value it had in the global field Select list (that's because the value is still stored in the database)
Scenario 2:
- You are able to expand both fields, and a value from the global field will be returned in the issue from a team-managed project (again, because that value is in the database):
{"expand":"names,schema","startAt":0,"maxResults":50,"total":1,"issues":[{"expand":"operations,versionedRepresentations,editmeta,changelog,renderedFields","id":"57361","self":"https://unlimitedjiraworks.atlassian.net/rest/api/2/issue/57361","key":"N1-93","fields":{"customfield_10225":null,"customfield_10143":{"self":"https://unlimitedjiraworks.atlassian.net/rest/api/2/customFieldOption/10346","value":"A","id":"10346"}}}]}
- That's a problem if customers need to fill in information in reports and end up adding values that don't really belong to the issues anymore
Workarounds
There are a few different workarounds for this scenario:
Workaround #1:
Add company-managed field to the team-managed project (requires project admin permissions). This can be either done via:
a) the "Configure" button in issue view
b) from "Project settings" > "Issues" > "Layout" in a company-managed project
c) from "Project settings" > "Issue types" in a team-managed project
Once the field has been added to the project, clear the value from all affected issues, and then remove the field from the project.
Workaround #2:
Bulk change affected issues from the top right expand menu in issue search:
Then select "Edit issues". During the bulk edit process, Jira will display all instances of the duplicated field, allowing to remove values from the old field.
Workaround #3:
Change the name of one of the fields so Search does not collapse them into a single column.
Workaround #4:
Write a script to edit affected issues via Jira Cloud platform REST API.
REST API consumers:
Additionally, if you need to use REST API and are receiving misleading results from the calls, you will need to make it so you perform calls using the specific IDs of each field.
Also, something that might help identifying the correct fields is by using the Get fields endpoint. Fields that belong to team-managed project have information such as type:Project on their values under the scope property:
{"id":"customfield_10225", "key":"customfield_10225", "name":"Select list", "untranslatedName":"Select list", "custom":true, "orderable":true, "navigable":true, "searchable":true, "clauseNames":["cf[10225]", "Select list", "Select list[Dropdown]"], "scope":{ "type":"PROJECT", "project":{"id":"10029"}}, "schema":{"type":"option","custom":"com.atlassian.jira.plugin.system.customfieldtypes:select","customId":10225}}
- is related to
-
JRACLOUD-74239 Creating a custom field with same name and context as another custom field leads to error in Advanced search
- Closed
-
JRACLOUD-79586 Creating a custom field with a duplicate name will break saved filters
- Closed