-
Bug
-
Resolution: Unresolved
-
Medium
-
2
-
Minor
-
Issue Summary
We have come across an issue, where if we create custom fields with same name say "abcd" in two or more Team Managed Projects, say Project A and Project B, then in NIN, every time we sort based on the field "abcd", then the sorting always take place based on the custom field created in Project A. As a result, if users are sorting the issues of Project B based on the field "abcd" the sorting does not work, because the sorting NIN sorts the issues based on the field "abcd" created in Project A, but in Project B this custom field is not present, so sorting does not take place.
Please note: We cannot change the scope of a field created inside a Team managed project, because these fields will not appear under Global Settings>>Work Items>>Custom Fields. They are local to the TMP projects. They can only be found at the respective TMP's Project Settings>>Work Types>>Select the applicable work type>>Find your field in the issue layout>>You can only edit the name, description & Default value of this field.
Steps to Reproduce
- Create a field "abcd" in the Team Managed Project "A". Say it's custom field ID is 10.
- Create the same field "abcd" in another Team Managed Project "B". Say it's custom field ID is 20.
- In TMP, you can create custom fields of the same name in different TMPs, because the field is local to the specific TM, it does not block the creation of a field with the same name in other TMPs. Just note that each field will have different custom field IDs, although the name would be same.
- Now go to "All Work" (New Issue Navigator) tab of Project "B", add the field "abcd" as one of the columns.
- Right-click on the "abcd" column and sort the Jira work items based on this field. Either in ascending or descending order.
Expected Results
The Jira Work items of Project "B" should get sorted as per the values present in the field "abcd" of Jira Work Items from the Project "B".
If you change the search type to JQL from Basic, it should show the JQL as:
project ="B" order by cf[20] ASC
Actual Results
The sorting fails for the Jira Work items of Project "B", and the order of the issues does not change. No error is shown.
If you change the search type to JQL from Basic, it should show the JQL as:
project ="B" order by cf[10] ASC
As the custom field with ID cf[10] is only present in Project "A", the sorting fails.
Workaround
You will need to rectify the JQL manually to include the correct Custom field ID. For example, in the above case, I will need to manually change the JQL to:
project ="B" order by cf[20] ASC