Forums

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

JIRA Structure Formula - Compare two field values

Jurica Petricevic
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.
April 24, 2023

Hi Community,

I have one task that I can't seem to solve.

Evaluation if the "customer" from the project ticket differs from the customer/account in the work package.

All customers are located in one project, and these project tickets are connected to Work packages with a unique link. When I arrange them all in Structure, I get a problem where I can't make a comparison.

I tried the following

ARRAY#distinct{X}  -> where x is Account because I want to get as many different Accounts as possible. Then i do in another Field this:
if (Customer = "One" and Account != "One"; "Wrong
if (Customer = "Two" and Account != "Two"; "Wrong";
if (Customer = "Three" and Account != "Three"; "Wrong";
if (Customer = "One, Two" and Account != "One, Two"; "Wrong"
))))
The problem is that if in the Field Account is  One, Two, Three, Four he doesnt see the problem with aynthing and this should be unique.

 

I just need to compare a values in 2 different fields which have several different values.

The task seems simple. If this value is, this is the correct value in the second field, and if it is not just say its wrong.

 

Has anyone had a similar problem? Can someone help me?

Best regards

1 answer

1 vote
David Niro
Atlassian Partner
May 1, 2023

Hello @Jurica Petricevic ,

Is "customer" a single-select pick list on the project ticket?  Is it the summary of the work package?

Is it only ever one "customer" on each?

I'm thinking we can FILTER() the issuelinks array and return the source "customer" then compare it to the project ticket customer.  I'll need to know a little more about the fields being used and also the issue link name and the directions.

Look forward to your feedback.

Best,
David

Suggest an answer

Log in or Sign up to answer