Forums

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

Can we target other issue, not the current issue using the jira expression, in JMWE?

Nicolas Andika
Contributor
January 23, 2024

So, I have 2 different projects, let's say project A and project B, i have put the issue in fix version in project A, and in project B i create custom fields short text, to put the name of the fix version, and i want to validate from the custom fields in project B, is the name of the fix version exist in project A or not, is it possible to do that?

2 answers

0 votes
David Fischer
Community Champion
January 24, 2024

Hi @Nicolas Andika 

unfortunately, from Jira Conditions and Validators, you can only use Atlassian's Jira Expressions language, which doesn't provide access to the list of existing Versions ("releases") in a project. So you won't be able to do what you're trying to do.

0 votes
Suprija Sirikonda _Appfire_
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.
January 23, 2024

Hi @Nicolas Andika,

You can use new Issue(ISSUE_KEY) to load an issue with the given key and then get the field values of this issue, for example: 

let otherIssue = new Issue("JMWE-1");
otherIssue.fixVersions

In the above example, I'm retrieving the issue with key JMWE-1 and then retrieving its Fix Versions in line #2.

So, if you want to check that the value of the short text field of current issue exists in the Fix Versions of another issue -> you can use the below Jira Expression:

let otherIssue = new Issue("JMWE-1");
!issue.customfield_10900 || otherIssue.fixVersions.some(it => (it.name == issue.customfield_10900))

You need to replace

  • JMWE-1 in line #1 with the desired issue key, whose Fix Versions you want to retrieve.
  • 10900 in line #2 with the ID of the short text field.

I hope this helps!

BTW, I'm from Appfire, the vendor of JMWE app. A support ticket has been created in our support portal for this case: SUPPORT-165870. However, we couldn't add you as a reporter. We’d like you to sign up for our support portal here and let us know your username so that we can mark your ID as the reporter and you will be able to access the ticket.

If the above solution doesn't work for you or your requirement is different, please feel free to share it on the support ticket.

Regards,

Suprija | Appfire

Nicolas Andika
Contributor
January 24, 2024

Hi, thanks for the advice,

but i still have a question, is it possible to not only targeting the specific issue, i want to check all the issue if it matches that will return true, but if all the issue doesn't match, it will return false? 

Regards,

Nico

Nicolas Andika
Contributor
January 24, 2024

My Name in Appfire Website is Nicolas Andika Tjandra

David Fischer
Community Champion
January 25, 2024

What do you mean by "check all the issues"?

If you're trying to force the user to enter a Version that's a valid version on project A, then see my answer above. 

However, you mentioned that you selected a specific Fix Version in an issue of project A, what's the relationship between that issue in project A and the issue in project B? 

Can you describe in more details what you're trying to achieve?

Nicolas Andika
Contributor
January 25, 2024

In project B I create custom fields name "Release" in a short text type, and then i want to create validators inside the workflows using the JMWE with build own script to check is the value of the "Release" Custom fields in project B is an exist fix version in Project A 

David Fischer
Community Champion
January 25, 2024

Right. So my first answer (at the top) stands: this is not possible on Jira Cloud, unless you create your own App using Forge. 

Nicolas Andika
Contributor
January 25, 2024

Hi @Suprija Sirikonda _Appfire_ any comments or any advice?

Suprija Sirikonda _Appfire_
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.
January 29, 2024

Hi @Nicolas Andika - the answer added by @David Fischer is correct. Jira Cloud workflow Conditions and Validators can only be written using Atlassian's Jira Expressions, and this doesn't allow you to access the list of versions ("releases") in a project.

Regards,

Suprija

Suggest an answer

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

Atlassian Community Events