Details
-
Bug
-
Resolution: Fixed
-
Low
-
3.12.2
-
3.12
-
Description
The 'Assigned To Me' portlet does not show the priority icon. Here is the steps to re-produce:
1. Create some issues with 'Bug' issue type and assign to current logged-in user
2. Create a Testing Field Configuration Scheme
3. In the Default Field Configuration, hide the 'Priority' field
4. Create a 'Bug' Field Configuration for Bug issue type with the 'Priority' field is not hidden
5. Associate this Field Configuration Scheme with the project
6. Go to dashboard and create an 'Assigned To Me' portlet. The 'Priority' field is not shown in the portlet for 'Bug' issue.
Please see the screenshot-1 for a clearer picture.
By looking into the method of isFieldHidden in FieldVisibilityBean.java, I have found the following:
if (TextUtils.stringSet(issueTypeId)) { if (ALL_ISSUE_TYPES.equals(issueTypeId)) { ..... for (Iterator iterator = issueTypes.iterator(); iterator.hasNext();) { String typeId = (String) iterator.next(); FieldLayout fieldLayout = getFieldManager().getFieldLayoutManager().getFieldLayout(project, typeId); if (fieldLayout == null || fieldLayout.isFieldHidden(fieldId)) { return true; } } // Field is not hidden in any field layout scheme associated with this project return false; } }
It always checks for the default field configuration first, and return the the value of 'true' if it found the field is hidden regardless of the other custom field configuration. As a result, the priority in 'Assigned To Me' portlet is not shown. Could it based on the issue type field configuration instead of the default one?