Community Announcements have moved! To stay up to date, please join the new Community Announcements group today. Learn more
×We're looking for a way to automate the linking of issues via a workflow post-function. Specifically, we need to link the current issue to a ticket of a specific type where the value in a custom user picker field matches the value of the same custom user picker on the current issue. So the logic we're trying to express is something like:
project = "Example Project" and issuetype = "Example Issue Type" where "Custom User Picker" = (same as "custom user picker" of currentIssue)
I know that's not a real expression and it doesn't resemble groovy, but hopefully someone gets what I'm aiming at and can provide an idea or two. We'd _like_ to leverage the "Link issues to the current issue" post-function (JMWE) if possible because it'd be cleaner, but if we can't, we do have the Scriptrunner post-functions available to us.
Hi,
you can totally do this with the "Link issues to the current issue" post-function. The main configuration of the post-function is not a Groovy script but a (templated) JQL expression. Therefore, you could write something like:
project = "Example Project" and issuetype = "Example Issue Type" and "Custom User Picker" = "${issue.get("Custom User Picker")?.name}"
This JQL should return the issue(s) in the specific project and of the specific issue type that has the same "Custom User Picker" value as the current issue. You can "Test" the JQL expression to make sure it works before saving the post-function.
Hope this helps,
David
Just confirms this works like a charm. Thanks for such a quick and helpful response, David.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
AI-powered meeting notes keep work moving even if you’re out of the office. Enjoy your well-deserved time off and return refreshed, confident you’ll catch up in no time.
Learn more
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.