You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
I'm trying to use a scripted field (Adaptavist Scriptrunner) Issue Picker.
I would like this field to use a JQL that is based on a value from within the ticket that the field is on.
Couldn't really find anything regarding this (whether I can use a dynamic JQL or if this needs to be scripted) in the documentation.
Hi, @Dirk R_
I had the same question before - https://community.atlassian.com/t5/Jira-Core-questions/Scripted-field-where-we-can-see-the-JQL-filter-s-results/qaq-p/1018559
Thanks for the feedback.
Doesn't look like it's entirely the same question but similar enough to piece together a solution!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Dirk R_ ,
did you find a solution for this?
We have exactly the same requirement like you.
Regards
Erik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also you can write on Adaptavist`s support - they have an excellent team!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Dirk R_ ,
I found a solution from scriptrunner documentation
https://scriptrunner.adaptavist.com/6.5.0-p5/jira/behaviours-conversions.html
and the hint at issue picker field configuration
JQL that the issue picker will select from. Leave blank to allow any issue
You can modify this with Behaviours using field.setConfigParam('currentJql', '<your jql query>')
My problem was, that Behaviour does not work on view screen but I can edit the field on view screen.
After I added a server sided script in a Behaviour I saw that the edit screen opens when I tried to edit the field with the server sided script in view screen.
So I added the same script for the issue picker field.
import com.onresolve.jira.groovy.user.FieldBehaviours
import com.onresolve.jira.groovy.user.FormField
import groovy.transform.BaseScript
@BaseScript FieldBehaviours fieldBehaviour
final FormField myFirstField = getFieldByName("My first field")
final FormField mySecondField = getFieldByName("My second field")
final def firstFieldValue = myFirstField.getValue()
if (firstFieldValue) {
mySecondField.setReadOnly(false).setDescription("Select an issue with '${firstFieldValue}'")
mySecondField.setConfigParam('currentJql', '"My first field" = ${firstFieldValue}')
} else {
// selected first field was null - disable control
mySecondField.convertToShortText()
mySecondField.setReadOnly(true).setDescription("Please select my first field before entering the issue")
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We often have questions from folks using Jira Service Management about the benefits to using Premium. Check out this video to learn how you can unlock even more value in our Premium plan. &nb...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.