Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.

How to auto-populate defect fields from TestRail

When clicking the Push link from TestRail to create a defect in Jira, how do I automatically populate some fields. For example, I want the defect fields Project and Priority of Jira defect to acquire the values from Project and Priority fields from TestRail. Also I want the Issue Type of defect to be defaulted to ‘Bug’. Refer to attached screenshot.

Is this possible? How?

Hi @ydlazkov,

Thanks for the post! It wouldn’t be directly possible to auto-populate your defect plugin fields based on an existing test case. While we haven’t tested this on our end, you might be able to use a UI script for this. This would require some JavaScript, HTML, and CSS knowledge to implement.

You may also be able to find other posts in our forums where users have shared scripts for modifications to the push dialog or add result dialog and use their scripts as a starting point.

In regards to the default Bug selection, TestRail wouldn’t have a default field selection for items in the push dialog, however you can set a plugin field to remember the last value used, as outlined in our documentation here.

Hope this helps!