Forums

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

Automation rule set up for xray issue types

Ayesha Pathan July 31, 2022

HI

I want to set up automation ruel such that if all tests are padded in a "Test" issue Type  then teh status of the JIRA  should be directly set to Done.

I tried setting up beow rule but it is not working. Can you please help

Capture.JPG

1 answer

1 vote
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 31, 2022

Hi @Ayesha Pathan -- Welcome to the Atlassian Community!

What is not working as you expect?  And, please post an image of the audit log details showing an execution of the rule to provide more context.

Also note in your rule, try using the Issue Fields Condition to check the Issue Type, rather than testing the Name attribute.

Kind regards,
Bill

Ayesha Pathan August 1, 2022

Hi @Bill Sheboy 

Thank you for the reply. Here is the Audit log. No errors but Issue of Test Type is not transitioned to Done even after changing as per your suggesion

Audit log.JPG

Ayesha Pathan August 1, 2022

I think we can not set Automation rule for Test Status field which comes from x-ray?

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.
August 1, 2022

Yes, I believe that is correct as it is a custom field for use with that addon.

I see in the audit log that the rule is not triggering.  What event/change are you making that you are expecting the rule to run?

Ayesha Pathan August 1, 2022

@Bill SheboyI even tried triggerrign it manually So the current rule is and its execution is:Audit log 2.JPG

Can we say we can not have a JIRA status set automatically based on any issue type created for Xray?

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.
August 1, 2022

First thing, I am not using Xray so I am trying to help based on what I understand about automation rules.

Looking at that audit log image, it shows that the first compare on issueType.name did not match.  And, the field name of issueType is misspelled.  Unfortunately, the rule editor does not catch such types of errors.

Perhaps try changing to use the condition on just Issue Type, and not the name, as that will use dropdown lists to ensure you have the correct values. 

Then we will be able to consider the next comparison's results.

Ayesha Pathan August 1, 2022

Apologies for the Typo. With correct name as well it is not performing any actions. Typo happened when I tried differrent cmbinations

Name Attribute.JPG

 

I also tried your suggestion about using type but that fails to recognise teh type itself

IssueType.JPG

 

I am using referrence of field name from

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#Available-properties.16

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.
August 1, 2022

Let's look at the symptoms you are seeing, one at a time...

Comparison for Issue Type

As I noted earlier, you should not need to match on the {{issue.issueType.name}}, but instead can just use the Issue Fields Condition.  The drop-down list for Value will show only valid values for the Issue Type.  If you type (e.g. Test) is not listed then it is not available in your project's scope.

Capture.PNG

Comparison for the Xray field

I suspect you have either the field name's smart value incorrect, the value incorrect, or both.  Smart values are case and spacing-sensitive, and if you have the incorrect value the rule will treat the value as null.

The way to confirm that is to use this how-to article listed below.  Basically you find an example issue with your data, and use a browser to call the REST API and find the exact name of the smart value.

https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/

Like Ayesha Pathan likes this
Ayesha Pathan August 1, 2022

@Bill SheboyI gte now what you are saying. So I rectified rule it use Issue Fields Condition.  But I think the real problem lies with the secnd condition

I used api to get the field names or smart value. But I do not see anything for Test Status. Though on issue itself I can see it

Demo issue.JPG

But REST API response has no description of teh x ray fields

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.
August 1, 2022

Thanks, as that helps clarify things...Short answer: I do not believe what you are trying is possible without calling the Xray REST API.

It appears the Xray information is dynamically generated from calls to their product's REST API.  That seems to match the information in their documentation: https://docs.getxray.app/display/XRAYCLOUD/Taking+advantage+of+Jira+Cloud+built-in+automation+capabilities

And it matches this Atlassian Community Post, where the Xray team notes the smart values are not accessible directly, and only by calling their REST API:

https://community.atlassian.com/t5/Marketplace-Apps-Integrations/XRay-and-Automation-smart-values/qaq-p/1648050

Like LuisPinto likes this
Ayesha Pathan August 1, 2022

Thanks @Bill Sheboy for your directions to conclude on this issue. I thought of creating a process which will not need mnaul interactions for signing off. But looks like we will need that for now.

Thanks again!

Like Bill Sheboy likes this

Suggest an answer

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

Atlassian Community Events