Details
-
Bug
-
Status: Done
-
Minor
-
Resolution: Fixed
-
5.4.43, 5.4.49
-
None
-
None
-
Sprint 50, Sprint 51
-
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