Forums

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

(JMWE app) Build-your-own (scripted) Condition

Amer Jneid July 5, 2020

I am trying to build an expression as a condition for the workflow to transition from one status to another.

I want to make sure that specifics Jira teams' portfolio are assigned to the issue before allowing the transition

[97,98,99].includes(issue.customfield_10001)

 

I want the team value assigned to be either one of a list [97,98,99]. I believe issue.customefield_10001 is the custom filed for team

When I test the expression. I don't get an error. I get failed, even though the team assigned to the issue is 98, which is on the list

Help

screenshot.png

2 answers

1 accepted

0 votes
Answer accepted
David Fischer
Community Champion
July 5, 2020

You should start by testing issue.customfield_10001 against an issue that is assigned one of the desired teams, using the “Test Jira expression” button. This will show you which value is returned. Also, check if it’s a string or a number, as you’ll need to specify your values in the list exactly as they are returned. 
David

Amer Jneid July 5, 2020

David, thank you for the hint. issue.customfield_10001 maps 2 data points id and title the correct expression is ["97","98","99","100"].includes(issue.customfield_10001.id) where 97,98,99,100 are the team ids and the customfield_10001 is the custom field for teams created by Portfolio 3.0 plugin

0 votes
Nbydei -
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 28, 2021

Have a good day Amer Jneid! Right now, I am building apps with the builder services at my friend's suggestion. I'm not sure about the docker environment, but i will try to help you to find a proper solution—a good way to build a proper app with a valid time economy. I will post the link here https://flipabit.dev/create/. If you need some information on how to make your own app with this app builder, send me a private message on this forum. Have a good one brother, stay safe and healthy! Cheers!

Suggest an answer

Log in or Sign up to answer