How to implement the conditional value set like equals(({{X}},"string"), "String A", "String B"))

Inna S March 23, 2023

Hi, 

I need to set a field to a value based on the value in a different issue field.

If

      Issue A field "FA" value is "word A" -> issue B field "FB" set to "Yes",

else

      issue B field "FB" set to "No".

I'm looking to do this inside the multiple conditions statement.

Thank you

3 answers

1 accepted

0 votes
Answer accepted
Inna S March 28, 2023

I found the answer in the list of functions:

IF(condition,value_if_true,value_if_false)

Returns one value if the condition evaluates to true or the other if it evaluates to false.

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/#Functions 

0 votes
Inna S March 28, 2023

Duplication.

0 votes
Bill Sheboy
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.
March 26, 2023

Hi @Inna S 

For a question like this, please consider posting images of the complete rule and audit log details showing the execution.  Those will provide context for the community to offer suggestions.  Thanks!

Without knowing the structure of your rule...how you solve this depends on the relationship between the issues:

  • If these are two unrelated issues, you would need a rule triggered on a change to issue-A so you can latter branch t o issue-B for the edit
  • If these are linked, this would be the same as unrelated issues
  • If these are parent/child issues, you may be able to reference the parent from the child using smart values, and so edit without branching

Kind regards,
Bill

Inna S March 28, 2023

Hi @Bill Sheboy , 

there is nothing to post here really.

I have an issue of one type, linked to an issue of other type.

When there is a change to the first issue, the second needs to be changed accordingly.

I know how to access field values in the trigger issue and how to set the field in the target issue.

The question is how to express this logical rule:

if

    the field of interest in one issue is equal a specific value,

then

    field in the target issue has to be set to value 'X', 

else  

    field in the target issue has to be set to value 'Y'.

 

This is a standard programming construct, I'm looking for this function in Jira automation and can't find it. 

Suggest an answer

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

Atlassian Community Events