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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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" }}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello, thank you very much for your feedback.
I also tried Context but still nothing:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello, I understand.
I'll test it here and get back to you soon.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I carried out the tests here and it was ok, you are a legend, thank you very much!
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.