Uploaded image for project: 'SR for Jira - Development'
  1. SR for Jira - Development
  2. SRJIRA-5265

Behaviour's hideTab(FieldScreenTab tabToHide) will hide next tab on the right if tabToHide is empty

    Details

    • Type: Bug
    • Status: Done
    • Priority: Low
    • Resolution: Done
    • Affects Version/s: 6.23.0
    • Fix Version/s: 6.26.0
    • Component/s: None
    • Labels:
    • Sprint:
      SR4J Sprint 98
    • Critical Points:
      0.5

      Description

      Behaviour's hideTab(FieldScreenTab tabToHide) will hide next tab on the right if tabToHide is already hid natively by Jira because tabToHide doesn't contain any field.

      This could happen when fields in the tabToHide are not available for certain issue type in same screen. 

      Steps to Reproduce

      1. Configure 2 additional tabs on a certain screen, for total of 3 (tab1, tab2 and tab3).
      Note: tab3 must be on the right of tab2.
      2. Put some fields into tab3.
      3. Set a behaviour to hide tab2 with hideTab(FieldScreenTab tab). In initialiser:

      import com.atlassian.jira.issue.fields.screen.FieldScreenTab
      
      FieldScreenTab tab2 = getFieldScreen().tabs.find {
          return (it.name == "tab2");
      }
      
      hideTab(tab2)
      

      Expected Behaviour
      This behaviour doesn't do anything because tab2 is already hid natively by Jira as tab2 has no field configured under.

      Actual Behaviour

      tab3 is hidden.

      Workaround

      Use hideTab("tabName") instead.

      Possible Explanation
      hideTab(tab2) use tab2.position to determine which tab to hide.
      1. On screen configuration, tab2.position is 1 and tab3.position is 2.
      2. When screen is opened, tab2 contains no field and is hid natively. Now, tab3.position becomes 1.
      3. Therefore, hideTab(tab2) will now hide tab3.

      Additional Info

      With explanation above, hideTab(tab3) will also fails when tab2 is already hid natively by Jira. All these behaviours are illustrated in following screen recording.

      Screen recording
      hideTab(tab) bug.mov

        Attachments

          Activity

            People

            Assignee:
            jechlin Jamie Echlin
            Reporter:
            mlim Max Lim
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: