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
Community Members
Community Events
Community Groups

[Automation for JIRA - XRAY ] Add Test into Plan test for Done Stories when the sprint is completed

Hi everyone,

I'm new in automation in JIRA, this is my very first script. Long story short,

My expectation : When a sprint is completed (trigger), i would like to add all tests linked to all Done Stories into a Plan test witch have start with the same name. And if the plan test does not exist, create it.


What I did :

  • Trigger : Execute only when specific sprint is completed thanks to a regex filter
  • Condition : Test if the plan test exist, if not create it.
  • Loop : Get all story in specific status with a test linked

Screenshot 2021-02-04 at 11.39.09.png


After this point, I am struggle, I don't know how to get each test from each story and put  it into the Plan test (created or already existing).

I am trying to copy ID of linked tests and then paste them into the plan test thanks to the JSON structure.

Another idea :

Shoud start to get all test issues and then find or create the plan test and link them together.


Do you have any advice ?


Thanks a lot for you help - Alex

1 answer

Hi @Alex 

The relationship between Tests and Test Plan is established using the Xray relations method, so it is only possible to add a Test to a Test Plan using Xray options.

Since currently, Xray does not integrate with Automation providing actions to perform Xray operations, it is not possible to use Automation to perform Xray operations.

Kind regards,
Rogério Paiva [Xray Support Team]

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Apps & Integrations

Marketplace Partner Spotlight: AppLiger

This month the spotlight is on AppLiger. We caught up with Pavel Pavlovsky, CEO and Product Manager, to learn how the company started and what fuels the team's creativity.    Atlassian:...

380 views 0 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you