Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Condition for JMWE linked item

Hey guys:

I have the following problem:

Am I doing an action in JMWE, which requires a condition?

If there is a linked item of type XX then OK.

I tried a few ways but nothing worked:

{{ linkedIssue.fields.issuelinks.includes ("XX") }} "It was not"

{{ linkedIssue.fields.issuelinks.name == ("XX") }} "It wasn't"

Can anyone here help me?

Thanks in advance

2 answers

2 accepted

2 votes
Answer accepted
David Fischer _Appfire_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 19, 2023

Hi @Henrique Degan 

If I understood correctly, you're using a JMWE post function and you need it to do its work only if there is an issue linked to the current issue that is of type XX. So XX is the issue type of the linked issue, not the type of issue link that links both issues. Is that correct?

Hello, thank you very much for your feedback!

So that's right, I'm making a Pos Function where a condition exists:

Trigger: When an Item is linked.
Pos function: Add a label
Condition: When the link type is: VAL

 

 

 

LINK12.png

 

LINK1.png

0 votes
Answer accepted
David Fischer _Appfire_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 20, 2023

Hi @Henrique Degan 

In that case, you're trying to test the link type of the issue link being added, not of any existing issue link. The link being added is available through the context.issueLink variable, as documented on the event based actions documentation. However, only the issue link type is available, not the issue link direction. For example, the "Clones" issue link type has two issue link directions: "clones" and "is cloned by". And users select a link direction, not a link type, in the "link issue" dialog box. So you'll need to figure out what the link type name is on the "Issue Linking" Jira admin page. Then you'll be able to use a condition like:

{{ context.issueLink.issueLinkType.name == "Clones" }}

Hello, thank you very much for your feedback.

I also tried Context but still nothing:

 

LINK4.pngLINK3.png

David Fischer _Appfire_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 20, 2023

Unfortunately, you cannot "test" the condition in the post function editor, as the context is empty (you are not currently linking an issue). You need to test it by saving the event based actions and linking issues together

Like Henrique Degan likes this

Hello, I understand.

I'll test it here and get back to you soon.

Hello,

I carried out the tests here and it was ok, you are a legend, thank you very much!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events