Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-14656

Parent(default) field configuration has overridden setting in issue type field configuration

    XMLWordPrintable

Details

    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?

      Attachments

        Activity

          People

            mtokar Michael Tokar
            cychan Chai Ying Chan [Atlassian]
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1.5h
                1.5h