Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to make field user picker form issue to be permissian condition for move link issue field

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

 

 

 

 

 

1 answer

1 accepted

0 votes
Answer accepted

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.

Hi @Bastian Stehmann 

 

thanks for your help

I tried the script, but it doesn't work

error1.JPG

 

please check my configuration, is somethink I missed?

 

Regards,
Tyas

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

Like Tyas Iglecias likes this

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're welcome. I'm working with this documentation.

https://developer.atlassian.com/cloud/jira/platform/jira-expressions/

Like Tyas Iglecias likes this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Software

👋 Looking for 15-20 volunteers to test Atlassian training content

Hi everyone! Are you interested in beta testing Atlassian University’s newest (unreleased!) training course? We’re looking for 15-20 volunteers to test our newest training course, Basic reporting...

835 views 25 28
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you