I am attempting to create an email notification that includes the number of failed tests in an Xray Test Execution Issue. (Xray is a test management plug-in for Jira). Unfortunately Xray-specific information such as Test Run results, whilst available in the Jira Issue UI are not part of any accessible Jira custom field.
I have an Automation Component that is sending a web request to the Xray API which returns the required information. I can then drill into that using a smart value that looks like this:
Is there any way I could I then count the number of 'PASSED's and 'FAILED's?
Hi @Alex Relton Brown -- Welcome to the Atlassian Community!
Without seeing your complete rule...I suspect you could use the match() function with a regular expression to search the response, producing a list of matches:
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/#match--
Then using the list function size you would get the count:
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-lists/#list.size
Kind regards,
Bill
Hello @Alex Relton Brown welcome to the community.
Can you share what do your raw response look like, screenshot is not JSON.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.