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

Behaviours cannot correctly alter the Issue Picker Fields JQL

    Details

    • Type: Bug
    • Status: Done
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.4.43, 5.4.49
    • Fix Version/s: 5.5.3
    • Component/s: None
    • Labels:
      None
    • Sprint:
      Sprint 50, Sprint 51
    • Critical Points:
      2.7

      Description

      Changing the JQL on the Issue Picker field using a behaviour does not work as expected. 

      From the JavaScript side it looks like the new JQL filter gets set but when you click on the issue picker field without putting in any text it will only show issues that match the original JQL for the Issue Picker field.

       

      When you start typing the issue Key it then applies the new filter.

       

      Step 1:

      Create the Issue Picker field:

      Step 2:

      Create the Behaviour:

       

      import com.onresolve.jira.groovy.user.FormField
      import org.apache.log4j.Logger
      import org.apache.log4j.Level
      def log = Logger.getLogger(getClass())
      log.setLevel(Level.DEBUG)
       
      FormField myIssuePicker = getFieldByName("MattsIssuePicker")
        log.debug("My Issue Picker Field Object = "+myIssuePicker)
       
      myIssuePicker.setConfigParam('currentJql', 'project = TP AND issuetype = Bug')
      

      Step 3

      Edit and issue with that field:

      Type the start of issue key and the new filter can then be seen as working:

      So before text is entered it still uses the original JQL hence why you see Tasks Only

      project = TP AND issuetype = Task

      Then after you type into that field it uses the new filter so you only see Bugs:

      project = TP AND issuetype = Bug

       

       

      Regards

      Matthew

        Attachments

          Activity

            People

            Assignee:
            rholban Roland Holban [X] (Inactive)
            Reporter:
            mclark Matthew Clark
            Votes:
            9 Vote for this issue
            Watchers:
            12 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: