Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to auto link RequisitePro Hierarchy(Parent-children) in JIRA issue linking.

Hardik Parekh February 16, 2016

Hi,

We are planing to migrate IBM rational tool - Requisite pro to JIRA,

We are able to import requirements of Requisite pro to JIRA through CSV export-import but issue is Hierarchy linking in JIRA

IN requisite pro requirements has multiple children  & children can also has multiple children.

Like see attached snapshot. UC262 is main parent requirement. it has children like UC262.1, UC262.2, UC262.3, UC262.4, etc...
Children UC262.4 has children UC262.4.1 & UC262.4.1 has UC262.4.1.1, UC262.4.1.2 so on. 

reqpro parent-child.png parent-children.png

 

So when I import these requirements to JIRA, all requirements will have new ticket number like PLUG-1, PLUG-2, PLUG-3, PLUG-4 so on...

I Can capture old values like UC262, UC262.1, UC262.2, UC262.4.1.1 etc in custom field "ReqproTag" in each new relent JIRA tickets. Like PLUG-1's ReqproTag is UC262, PLUG-2's Reqpro Tag is UC262.1 etc so on.

Now I want to find new relent JIRA tickets of UC262, UC262.1, UC262.2, UC262.4.1.1 etc & then auto link respective JIRA tickets of 

1) UC262.1, UC262.2 etc with UC262

2) UC262.1.1, UC262.1.2 etc with UC262.1

3) UC262.1.1.1, UC262.1.1.2 etc with UC262.1.1

 

in shot I want to link children ticket

XYZ.* with XYZ

XYZ.1.* with XYZ.1

XYZ.2.* with XYZ.2

XYZ.2.1.* with XYZ.2.1 

 

We have around 160K requirements & it will be impossible to link every parent-children (Tickets) with each other manually.

Hoping for some solution. If any plugin automation / third party plugin / groovy etc can help.

I have tractability linking issue in past which is kind of matching this & for that I got very good solution by using JIRA Workflow Toolbox plugin. If it helps.

Link : https://answers.atlassian.com/questions/36111703

Thanks & Regards,

Hardik Parekh

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Fidel Castro
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.
February 17, 2016

Hi Hardik,

You can also do it using JIRA Workflow ToolboxI explain you in detail how to do it:

 

1) Create a reflexive transition called "Recreate Links Hierarchy". This transition has same status as origin and destination, and should be available for all the issues we want to link, i.e., the transition should be present in all the statuses where issues are. If all your issues are in the same status, you only have to create one. Recent versions of JIRA also supports creation of global reflexive transitions, but a bug in current version of JIRA Workflow Toolbox prevents it from working with them, so you can't use them. Next version of the plugin will fix this bug.

 

2) Add post-function "Copy a parsed text to a field" post-function to "Recreate Links Hierarchy" transition using the following configuration :

Captura de pantalla 2016-02-18 a las 10.42.54.png

Text to be parsed is:

toString(filterByPredicate(issuesFromJQL("ReqproTag ~ \"" + replaceAll(%{10100}, "\\..*$", "") + "\""), matches(^%{10100}, "\\Q" + %{10100} + "\\E\\.\\d+$")))

Note that 10100 is field code for ReqproTag custom field in my particular JIRA instance. You should replace it with yours.

The screenshot doesn't show parameter Run as. You should set it with an administrator user, who has permissions to browse and create links in all issues.

 

3) Add post-function "Create issue link" with the following configuration:

Captura de pantalla 2016-02-18 a las 10.46.25.png

 

4) Add post-function "Write field on issues returned by JQL query" with the following configuration:

Captura de pantalla 2016-02-18 a las 10.51.23.png

JQL Query is:

issuekey in (%{00061})

 

Once configured, transition "Recreate Links Hierarchy" will look like this:

Captura de pantalla 2016-02-18 a las 11.11.49.png

 

5) Now use a JQL query to search for all the issues in the root of the hierarchy, i.e., those issues whose ReqproTag custom field doesn't contain dots (e.g., UC331, but not UC331.1), and use bulk operation to execute in all of them transition "Recreate Links Hierarchy".

The hierarchy recreation will be run in background, i.e., once you execute the bulk operation, a thread will run in background and will keep for some time triggering a cascade of "Recreate Links Hierarchy" transition executions. As a conservative estimate, it might take 1 second per transition execution.

If you want to have a direct indication of when the process has ended, you can set logging level to DEBUG for com.fca.jira.plugins.workflowToolbox.tasks package. You can do it at Administration > System > Logging and Profiling > Configure logging level for another package. It will be obvious when the process has ended simply monitoring the log file.

Hope this helps.

Hardik Parekh March 27, 2016

Thanks for detailed solution Fidel.

It is working.

TAGS
AUG Leaders

Atlassian Community Events