How to Automatically link an issue to an existing issue

Thomas Varghese September 19, 2012

We have a new issue type by name TestCase.

When a user creates a new TestCase issue from a UserStory, is there a way to automatically Link it to a UserStory with out the user manually doing it .

thanks

Thomas

3 answers

0 votes
C Abone June 4, 2015

This can be achieved using the 'Create issue link' post function and would only work as long as the issue is created within the Epic or linked to the related Epic using the ‘Epic Link’ field during creation.

In my case, i wanted any new story issue type to be automatically linked to the Epic using the 'blocks' option from the 'Issue Linking field during creation.

In the 'Create' transition, select the post function (Create issue link)

From the Issue s to be linked parameter, select the 'Field containing issue keys' option and in the dropdown,  Keys of linked issues

image2015-6-4 12:57:44.png

From the Issue link type to be created, I selected the 'blocks' option. You can select any option depending on the linking that is required.

image2015-6-4 12:58:12.png

Click on the Add button.

Don't forget to select the 'Publish Draft' button to save your changes

image2015-6-4 12:58:49.png

 

Hope this helps.

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 19, 2012

Three things.

1. You need to think this through - how does a "user create a test case from a user story"? You need Jira to understand when they are doing this, which implies a workflow process or new option to do it as an action (like "edit", "comment" etc). Either way, you can then tag code into that process to do the linking

2. You can't install the plugins/code you might need to do this in OnDemand (and you'll probably have to write it yourself)

3. Have you looked at "subtasks"? Those are automatically linked to their parent.

Thomas Varghese September 19, 2012

Thank you Nic for your quick response.

Since we are using OnDemand, I believe we can't create an "Create Test Case" action button like "edit" and "commit". But you have mentioned that cab write this code myself. Is there any sample code available for similar functionality available where I can use it as a reference

Thomas Varghese September 19, 2012

Also for a typical software development environment, is Test Case is created as a Sub Task of User Stroy? Is that the best practice recommended by JIRA?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 19, 2012

You're missing the point in answer 2 - you can't install plugins or code on OnDemand.

Some people create test cases as sub-tasks under an item, I find it quite a clear and logical way to work. Others don't. It's more up to your processes and way of working - I can't give you a clear cut "yes, it's the best way to do it" here.

0 votes
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 19, 2012

There are plugins that can do it but it is not possible on onDemand instance.

Suggest an answer

Log in or Sign up to answer