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

Behaviours not highlighting tab when a field is required

    Details

    • Type: Bug
    • Status: Done (View Workflow)
    • Priority: High
    • Resolution: Done
    • Affects Version/s: 5.8.0-p5, 6.2.0-p5, 6.5.0-p5
    • Fix Version/s: 6.9.0
    • Component/s: Behaviours
    • Labels:
    • Sprint:
      SR4J Sprint 82, SR4J Sprint 83, SR4J Sprint 84
    • Critical Points:
      10.7

      Description

      Description:

      When you make a field required which is on another tab then if the user tries to create the issue without filling the field on the other tab then the tab should be highlighted red.

      This behaviour worked with version 5.7.2-p5 of ScriptRunner but stopped working for other versions afterwards such as version 5.8.0-p5.

      The impact of the tab no longer being highlighted is that users no longer know which tabs have required fields meaning that nothing happens when they click the Create button and that they do not why the issue cannot be created which is not a very good user experience.

      Steps to reproduce it:
      1. Add a second tab to one of the screens used by a project mapped to the behaviour.
      2. Add a custom field to the screen which is a number field or a text field.
      3. Add a behaviour to make this field required using the built configuration as shown below and save the behaviour as shown below.

      4. Ensure version 5.7.2-p5 of ScriptRunner is installed and create an issue and you will see that the tab containing the required field is highlighted as expected as shown below.

      5. Ensure version 5.8.0-p5 of ScriptRunner is installed and create an issue and you will see that the tab containing the required field is not highlighted as expected as shown below.

      Workaround:

      A workaround for all versions of ScriptRunner greater than 5.7.2-p5 where this error occurs is to add some help text to the Summary field explaining which tabs have tabs required fields on so that the user sees this help text and knows which tabs they must complete the required fields on.

      A sample of what the code to do this would look like is shown below.

      // get the summary field
      def summaryField = getFieldById("summary")
      // Set some help text
      summaryField.setHelpText("Please note a required field exists on the <TabNameHere> tab which must be completed before you can create this issue.")
      

        Attachments

        1. 5.7.2-p5Behaviour.png
          5.7.2-p5Behaviour.png
          13 kB
        2. 5.80-p5Behaviour.png
          5.80-p5Behaviour.png
          14 kB
        3. behaviourConfig.png
          behaviourConfig.png
          28 kB

          Issue Links

            Structure

              Activity

                People

                Assignee:
                krana Kyran Rana
                Reporter:
                kwalker Kristian Walker
                Votes:
                4 Vote for this issue
                Watchers:
                13 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Structure Helper Panel