We have a user that use to be able to be added to the calendar, and now he cannot be chosen. We are still able to create JIRA tickets for him, it just seems to be confluence. I just tested to see if I can do an @ tag for him in confluence and I cannot, but I can still tag the rest of the members of the team.
After talking with @JamieA at Summit19 - he provided me with a solution.
Step 1:
Create the custom field with the issue picker: https://scriptrunner.adaptavist.com/5.5.0/jira/script-fields/issue-picker.html#_usage .
Step 2:
Create a behavior for all projects (or just the projects you care about) and potentially the issue types you care about.
Inside the initializer add:
getFieldByName("Picker").setConfigParam("currentJql", "project = ${issueContext.projectObject.key} and <insert the rest of your query>")
Note: Unfortunately you have to hard code the query in both places. You technically don't need to hardcode it in step 1, but you should because of the second points below.
Note: Unfortunately there isn't a "getConfigParam" to get the current JQL. I mentioned this to Jamie and he may fix it.
Note: Ideally issue picker would just support something like {issue.project.key} in the query. I mentioned this to Jamie and he may fix it.
Jamie is/was one of the lead developers for Script Runner (he was the creator of it before it was bought out by Adaptavist).
I don't know if there is a ticket for this, but the workaround above is still valid. Feel free to create a support ticket with Adaptavist and post it here (if they have a public tracker).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would like to refer to the current issue, not the current project.
So I guess
project = ${issueContext.projectObject.key}should be replaced.
Could someone let me know what syntax to use?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I found a solution.
def MyKey = underlyingIssue?.key
getFieldByName("Picker").setConfigParam("currentJql", "<insert JQL here containing ${MyKey} to represent the current issue key>")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.