Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do you trigger scriptunner scripts via listener and expression when linking issues?

Teodor Hoza
Contributor
April 15, 2022 edited

Case: 

Issue 1 from project A and issue 2 from project B

I created a script listener on on project A with Issue link created trigger. (script does not matter in this case)

When linking an issue 2 to issue 1 with link type issue 2 "causes" issue 1 the script triggers, all good here, but when I try adding a condition which tries to filter the link based on direction and project key, the script no longer triggers.
Here's a list of conditions I tried to use (they are valid conditions).

1. issue.links.filter(L => L.type.inward.includes("is caused by") && L.inwardIssue.key.match('^(A)')).length > 0

2. issue.changelogs[0].items.filter(L => L.field == "Link" && L.toString.includes("This issue is caused by A")) != null

Note, I also tried working around this by using Issue Updated and Issue Updated + Link created.

I am running out if ideas, please help

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, mindful member, mindful member badge, atlassian community, community kudos, community giveaway, atlassian swag, community values, empathy and kindness, badge challenge, atlassian learning, community engagement, swag giveaway

Earn a Badge, Win a Prize 🎁

Earning the Mindful Member badge proves you know how to lead with kindness, plus it enters you into a giveaway for exclusive Atlassian swag. Take the quiz, grab the badge, and comment on our announcement article to spread the good vibes!

Start here
AUG Leaders

Atlassian Community Events