How to Automatically link an issue to an existing issue

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

This widget could not be displayed.

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

This widget could not be displayed.

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.

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

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?

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.

This widget could not be displayed.

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.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

170 views 1 3
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you