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

Issue Picker required field doesn't register a valid selection

    Details

    • Sprint:
      SR4J Sprint 86
    • Critical Points:
      10.7

      Description

      Customers upgrading to ScriptRunner 6.6.0 are reporting a problem with the Issue Picker selection field. Downgrading is a workaround that they are using at the moment.

      When they select an Issue for the Issue Picker field, the form doesn't recognise that a valid issue has been selected

      Steps to reproduce

      • Create a single "issue picker" scripted field and add it to your project's screens
      • Make it required on the create transition with a simple scripted validator that sets an error message on that issue picker field when it is empty
      • Try to create a new issue and ensure that the "issue picker" field is empty
      • The screen shows that the "issue picker" field is empty and adds the error to the field as expected
      • Provide an issue in the issue picker field
      • Click to create the issue again

      Expected result

      The issue is created and the selected issue is saved as the value for the "Issue picker" field

      Actual result

      The issue cannot transition and the "issue picker" will still show the error telling the user to fill in the field

       

      Example Simple Scripted Validator that can be used to show the issue picker has null value when the validator checks if it has been filled in

      log.warn "result : ${cfValues['IssuePickerA']}"
      return cfValues['IssuePickerA'] ? true : false
      

       

      Workaround:

      Use behaviours to set the issue picker to "required" for the transition you specify.

      E.g. use something like this as the initialiser:

      (getActionName() == "In Progress") ? getFieldByName("IssuePickerA").setRequired(true) : getFieldByName("IssuePickerA").setRequired(false) 

       
      Or,

      This video demonstrates the bug and how to implement a workaround for field validation: ISSUE_PICKER_TRANSITION_BUG.mov
       

       

        Attachments

          Issue Links

            Structure

              Activity

                People

                Assignee:
                jechlin Jamie Echlin
                Reporter:
                jbaldwin Joe Baldwin
                Votes:
                9 Vote for this issue
                Watchers:
                15 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Structure Helper Panel