Hi Guys,
I have 2 issuetype, Story and bugs
I used field IT Problem Manager (user picker (multiple users)) in story,
than I linked Story to Bugs.
What I want, issue bugs can move status by users in field IT Problem Manager
I make script in JMWE in workflow Bugs
user.displayName == linkedIssue.customfield_12441[0].displayName
test results :
- Scenario 1 :
if I input user A in field IT Problem Manager in story
user A can move status in issue bugs, and user B can't move status
- Scenario 2 :
if I input user A an user B in field IT Problem Manager in story
user A or user B can't move status in issue bugs
what I want make script to make Scenario 2 work used (user picker (multiple users)) from linked issue
what should I do?
Regards,
Tyas - CIT
Hi @Tyas Iglecias ,
I think the problem is that you are checking for equaltiy, so the username must match the content of the field.
Assuming that linkedIssue.customfield_12441[0].displayName returns a String containing both user Names, you can try something like this (I couldn't test it currently)
linkedIssue.customfield_12441[0].displayName.matches("(.*)"+user.displayName+"(.*)")
This checks, if the String returned from the field contains the Display Name.
thanks for your help
I tried the script, but it doesn't work
please check my configuration, is somethink I missed?
Regards,
Tyas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hy Tias,
sorry for the delay, I had now some time to try myself.
I think, we need another approach here. Can you try this one:
linkedIssue.customfield_10029
.filter(u => u.displayName == user.displayName)
.length > 0
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bastian Stehmann ,
Thanks for help, its work!
is there a reference I can read to be able to make a script like yours?
Regards,
Tyas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're welcome. I'm working with this documentation.
https://developer.atlassian.com/cloud/jira/platform/jira-expressions/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.