Hello everyone,
our situation:
We use Xray/Jira DC and cannot make any changes to the fields outside of the Xray issue types.
If a defect is created from a test execution/test run, we are therefore missing the informations of the field "testenvironments".
So we want to add the value of the field "testenvironments" (labels, issue Test Execution) to the environment field (freetext, defect) when a defect is created from a test run.
Does anyone have any ideas or tips for a suitable automation rule?
Hi @Daniela Maubach - welcome to the community,
is there any characteristic that uniquely identifies a defect created from an execution (like a special linking or so)?
This would be needed to specify the trigger and consition for an A4J rule.
Best
Stefan
There is an option in xray settings that specifies that a defect created out of an execution is linked to the test execution (i tested this, it´s set with the created link type).
Provided that this setting is set and the issue link is set when a defect is created out of a test run - this can be done as this would be the only trigger that comes to my mind.
Nevertheless, it was a tough task to find the solution.
The field "Test Environments" is not a native Jira field therefore it cannot be fetched directly via field actions or smart values in Automation. Therefore it´s necessary to call the graphql api to fetch this information.
Trigger:
when - Issue linked, Types: Defect
I set the condition to check if the linked issue is a test execution to limit potential activations of the rule.
Then there is the tricky part of getting the field value of "Test Environments":
I call the xray graphql api with the query "getTestExecution" and ask for the testEnvironments information. I then store the response to a variable to use later on when editing the created defect (see screenshots):
To edit the correct a branch of type "Destination issue" is created. This will take the Defect into context and the actual edit action is made in the created/linked defect issue (i just wrote the information into the description field, you just need to change the field regarding your requirement):
I tested this rule in my system and it did the job.
Hope I could give some helpful input.
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Stefan,
I'm currently heavily involved in a release.
Thank you very much for your comments, time and thoughts!
I won't be able to test it until next week but will let you know as soon as possible.
I wish you a wonderful weekend!
Daniela
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your kind feedback and letting us know even though I´m sure you have little time for this in between a release 🙈🥵 great communication skills - I highly appreciate 👌🏼🙏🏼
deep dive and give it a shot whenever possible and just let us know if it´s working or if there are any further questions.
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey,
it's me again :)
Unfortunately, I can't try out the solution with a webhook because we don't allow this in my company.
Now I’m waiting for the person responsible for Xray to come back from vacation.
We will then work through our options again, including your solution.
I'm very happy that you showed me this solution and explained where the fundamental problem with this automation rule lies!
The number of possibilities in Jira are simply incredible. I was aware of this from the beginning, but it becomes clearer with every hour of more in-depth induction.It's good that there are people like you!
Thank you very much for your effort!
Daniela
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Daniela,
Thanks for the flowers. I´m really happy that I could give some good examples/insights and also good explanations. Thanks for that flattering feedback.
Unfortunately I don´t see any other possibility than the api call to get the "Test Environments" field´s value. Hope you can manage to get this working.
I´m looking forward to your answer after you go through the solution with your colleague.
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Stephan,
thank you for your inquiry and interest!
Unfortunaley I was injured - but now I am back :)
I wish I could give you an update. But I have not yet heard back from the decision-makers about what we are doing. I ask them regularly.
Best regards!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
oooh nooo..... hope not seriously injured and hope you are doing well again 🙏🤞🙌
good to hear you are back again :)
no hurry, take your time :)
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.