JMWE: Copy field value from linked issues

Jurica Petricevic
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 7, 2022

Hi Community,

 

we use the mentioned post function JMWE: Copy field value from linked issues and we want that only in case of connection with Period Issue Type, and if that ticket has in the name "backlog" that the accound value of the field will be copied to the newly created ticket.

Photo 1.JPG

Is this possible even because i don't have this option here?

 

Best regards

Jurica

1 answer

0 votes
David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 7, 2022

Hi @Jurica Petricevic ,

there are two ways to do this:

- using the "Issues returned by the following Groovy Script" option of "Source Issue(s)"

- using conditional execution together with a regular issue link type as the "Source Issue(s)" option

For the first approach, you can do something like:

issue.getLinkedIssues("blocks").findAll{ it.get("issuetype").name == "Period" && it.get("summary") ==~ /(?i).*\bbacklog\b.*/}

Of course, you'll need to adjust the issue link direction (here "blocks") or just use issue.getLinkedIssues() to return all linked issues, whatever the link type.

Suggest an answer

Log in or Sign up to answer