Forums

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

Automation for Jira - endWith only matching with Yes and No

Malka
Contributor
March 19, 2020

So I am doing a defect matrix and here are some of the things I am trying to check. The ones that check for yes or no are passing, the ones with any other word come back as expecting three elements, but only finding two.

{{#=}}IF({{issue.Application Workflow is Functional?.value.endsWith("No")}},30,0)+ IF({{issue.Does this Involve Data Corruption?.value.endsWith("No")}},0,50) + IF ({{issue.Performance or Speed Related?.value.endsWith("Yes")}},10,0) + IF ({{issue.Compliance Issue?.value.endsWith("Yes")}},30,0) + IF({{issue.Is this a Patient Care Issue?.endsWith("Maybe")}},15,0) + IF({{issue.Is this a Patient Care Issue?.value.endsWith("Yes")}},30,0) + IF({{issue.Impact to Financial?.endsWith("Direct")}},30,0) + IF({{Impact to Financial?.endsWith("Indirect")}},20,0)+ IF({{Impact to Financial?.endsWith("None")}},0,0)+ IF({{issue.Data Not Displaying or Displaying Incorrectly?.value.endsWith("Yes")}},15,0) + IF({{issue.Visual Artifact.value.endsWith("Yes")}},5,0) {{/}}

1 answer

1 accepted

1 vote
Answer accepted
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.
June 30, 2020

Hi @Malka 

Were you able to figure this one out?  I did some checking and I noticed:

  • The function endsWith does not handle empty values or mismatches well.  I got around that by using the default value to support the IF test.  For example,
IF({{somefield.endsWith("Hello")|false}}, 10, 20)
  • In your formula, some things include the issue. reference and others do not.  That should not matter, but who knows.  Same thing for the use of .value

 

Best regards,

Bill

Malka
Contributor
June 30, 2020

Those were guesses on the issue. & trial and error on the .value parts. 

 

I do have it working on our instance now. It's made things a lot easier for triaging. I can't wait for intellisense on these things. 

Like Bill Sheboy likes this
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.
July 1, 2020

I agree!  Seems like some of these went to the "future consideration" chasm.

https://jira.atlassian.com/browse/JSWCLOUD-20445

https://codebarrel.atlassian.net/browse/AUT-1968

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