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



    • Bug
    • Status: Done
    • Medium
    • Resolution: Fixed
    • 6.6.0
    • 6.10.0
    • Script Fields
    • None
    • SR4J Sprint 86
    • 10.7


      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



      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) 


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



        Issue Links



              jechlin Jamie Echlin
              jbaldwin Joe Baldwin
              9 Vote for this issue
              15 Start watching this issue