Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,360,111
Community Members
 
Community Events
168
Community Groups

Jira Software + Xray - Is it possible to sync field values with Jira Automation?

Edited

Hi there!

We are using Jira Software and the Xray Add-on and I'd like to use the Jira Automation feature in my project. I´m not interested in additional Add-ons.

Is it possible to automatically sync field values between Preconditions / Tests / Test Sets / Test Plan / Test Executions and Bugs? My problem here: I´m not sure which trigger events would make the automation robust.

Lets say I'd want to create a (Sub) Test Execution to retest after a bugfix was made available. I'd link all relevant issues (Test & (Sub) Test Execution with the Xray feature, Test Execution & Bug with the Jira feature). Now the question is: will the Xray feature provide a robust trigger event? 

Another case could be the creation of a Test Execution from a Test Plan. Here we don't have a trigger event apart from issue creation, I think. Both issues are linked by Xray and maybe the Test Execution includes the Test Plan issue ID in its Summary (if my team agrees to not mess with how Xray populates the Test Execution Summary field). 

How would you go about this?

Thanks for reading!

Best regards,

Robin

3 answers

0 votes
Stefan Salzl Community Leader Aug 17, 2022

Hi @Robin Taylor ,

regarding your first requirement (as far as I got it right) all the necessary issues should be linked if eg. bugs are configured in your test/requirement coverage settings.

eg. there is "BUG A". Within that bug "TEST_01" is created that is covering the bug retest --> therefore the test is linked to the bug (bug is tested by test). The moment a test execution is created for "TEST_01" this test execution will also be shown in the bug issue.

Hope this helps (at least for your first requirement).

Best
Stefan

0 votes
Sam Harding Atlassian Team Aug 16, 2022

Hi @Robin Taylor 

I am not familiar with the xray add-on, so apologies if anything I provide here is missing the mark. Automation is able to trigger on issues created by any source, including add-ons. So in your first use case of wanting to link all relevant tasks to the (Sub) Test Execution, there are a few ways you would be able to do this depending on how Xray's issue relationship is setup.

For the trigger, the trigger on `Issue Create` would be robust and sufficient. Then you could have a condition to check the issue type is the associated type for `(Sub) Test Execution`. Then, you could look up the IDs of the issues you want to link, by using a JQL search based on information in the issue description etc. followed by a 'Link Issue' action.

It is difficult to determine the most appropriate course of action here, as it depends on the way xray and your configuration is set up, but as for the robustness and compatibility of the xray triggering events, I would see no reason why the rule would not be feasible.

The same logic applies for the second use case as well. On issue create, you could extract the ID inside the summary using regex for example (see documentation on smart value regex here), then use the extracted ID to link the issues together.

I hope that helps a bit in answering you question. If you want more information on getting these rules working, maybe if you wouldn't mind providing some example data and some further details about the work flow, and we can try to construct a viable rule.

Cheers
Sam

Hi Sam,

Thank you so much for taking some time :)

Xray specific fields are not available in Jira search functions, so no luck with JQL so far. Xray even has its own activity stream per issue (which is not searchable as well). The way the Xray Issue Picker function works is not related to the standard Jira link issue feature at all (again, no luck with the search function). In fact you can use both functions in parallel.

Because of this I assume there is no easy way to trigger an automation without getting really creative like scanning for Issue-IDs oder Text snippets in Descriptions or Summaries (which is probably way less robust than what I would need to populate thousands of Tests / Test Sets / Test Plans & (Sub) Test Executions).

A workaround would be a multi-stage CSV import, but even there I'd have massive problems because of the split of standard Jira fields and Xray functionality.

I was thinking of

  • Jira Standard CSV import to create a large batch of Test Sets
  • Export CSV to receive freshly created Test Set Issue IDs
  • Create new CSV file grouping Tests to freshly created Test Set Issue IDs
  • Xray CSV import to create Tests while (Xray function) linking them to Test Sets

As far as I know the Xray import will only create Test issues, no other issue types are supported. So I'd have some issues linked (and Jira and Xray fields populated by the CSV import), but then I'd have the same problem with Test Plans and (Sub) Test Executions.

Best regards,

Robin

Afterthought: Is it possible to link Tests to all Xray issue types while using the Xray CSV import mechanism?

If that's possible I could 

  • Jira Standard CSV import to create a large batch of Preconditions
  • Jira Standard CSV import to create a large batch of Test Sets
  • Jira Standard CSV import to create a large batch of Test Plans
  • Jira Standard CSV import to create a large batch of Test Executions
  • Export CSV to receive freshly created Issue IDs
  • Create new CSV file grouping Tests to freshly created Issue IDs
  • Xray CSV import to create Tests while (Xray function) linking them to other Xray issue types via freshly created Issue IDs

I will try this today and report back.

No ideas? :)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
Community showcase
Published in Jira Software

An update on Jira Software customer feedback – June 2022

Hello Atlassian Community! Feedback from customers like you has helped us shape and improve Jira Software. As Head of Product, Jira Software, I wanted to take this opportunity to share an update on...

4,996 views 18 31
Read article

Atlassian Community Events