Linking and fields mapping between JIRA issues made easy with Exocet


Posted by
Jérémie MARTINEZ

May 12, 2014

Have you already tried to set up a hierarchical links between  JIRA issues? Then you have certainly been using the native subtasks system and faced its limitations.

In JIRA indeed, there is no feature allowing to map the parent issue with its subtasks fields. Every time you link issues, you need to write manually the inherited content of a field. Tedious, isn’t it?

Exocet – our add-on, not the missile – adresses these limitations. It enables you to easily create linked issues in various ways : single copy, multiple copies, customised mapping…

With its latest release, Exocet makes Copy/Creation simpler and more efficient than ever:

  • Create a linked issue from an issue in one click: no need to go through the “More actions” drop down menu
  • Show useful data only: custom fields, images, transitions… whatever your users need to execute a request?

Now let’s see how it works.

Create and link issues in a click

Fed up of having to go through a crowded drop down menu to create issues? With Exocet, you can now choose to display your favorite operations as buttons and create linked issues directly from the issue view.

Configuration

In Exocet administration, you can now find a new “Operation access” menu  in the operation creation pop up.

CreateOperation

New “Operation Acess” menu

By picking “Actions Menu” the layout will remain identical, but if you tick Issue View the operation will appear as a button directly in the issue.

Result

When “Issue View” is ticked, available operations are now shown directly:

OperationView

New operations buttons in the Issue View

In case of multiple operations, you can choose in the “General” Menu the maximum number of operations shown in the issue. In addition, operations will be available in a drop down menu – we kept the same principle as for workflows transitions.

MoreOperations

Operations can be shown in a drop down menu

A customised view for linked issues

The linked issues list and the subtasks list, both quite simplistic, have shown their limitations. The “Advanced Data” panel of Exocet adresses this problem and enables you to choose which data of your linked issues you want to display.

Configuration

In Exocet administration, you can now find an “Advanced Data” panel. Admins are now able to create/modify/delete “Tables”.

TableList

In Exocet, a “Table” has a title, a “JQL” query, columns and possibly calculated fields. These tables are then presented as panels in the issue.

TableCreation

Creating a table in Exocet

You can add any initial or customised field as a column of the table.
When the paper clip is ticked, a link towards the issue is available in the panel.
It is essential to write a correct query. You can use the Issue Browser to help you with that.

Result

Every table with at least one issue matching the JQL request criteria will be displayed in  the Issue View of the current issue.

AdvancedData

Advanced Data panel

When displaying the subtask column, you can have a 3-levels overview of issues. The Σ Progress column will show the work progression for the issue and its subtasks.
When one or several transitions are available for the user, a star wheel appears on the right side of each issue.
You can show several tables in a same issue.

In addition of transferring data of linked issues to a parent issue, we can now “use” this data. Indeed, while configurating a table you can select one or several “Scripted field” (provided by Script Runner) in order to calculate a sum depending on the value of an other field.

Example

Let’s take the example of a parent issue in which 3 issues are shown in “Advanced Data”. These issues have a numeric field called “Price” and a radio button called “Criteria”:

IssueListWithCriteria

List of initial issues

We want to calculate the sum of prices when the criteria associated to the price is “yes”only: 

1. Create a “Total Yes” Scripted Field

2. Configurate it with a code as follows:

<code>import com.atlassian.jira.ComponentManager</code>import com.atlassian.plugin.PluginAccessor</p>
<p>import java.util.HashMap
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.IssueManager
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.MutableIssue
import com.atlassian.jira.issue.link.IssueLink
import com.atlassian.jira.issue.fields.CustomField
import com.atlassian.jira.issue.customfields.option.Option
import com.atlassian.jira.issue.customfields.view.CustomFieldParams
import com.atlassian.jira.issue.customfields.option.LazyLoadedOption
import com.atlassian.jira.issue.customfields.impl.CascadingSelectCFType</p>
<p>enableCache = {-> false}</p>
<p>PluginAccessor pluginAccessor = componentManager.getPluginAccessor();
Class dataPanelScoringServiceClass = pluginAccessor.getClassLoader().findClass("com.valiantys.jira.plugins.exocet.service.DataPanelScoringService");</p>
<p>def dataPanelScoringService = componentManager.getOSGiComponentInstanceOfType(dataPanelScoringServiceClass);
def customFieldManager = ComponentManager.getInstance().getCustomFieldManager();</p>
<p>def prix = customFieldManager.getCustomFieldObjectByName("Prix");
def criteria = customFieldManager.getCustomFieldObjectByName("Criteria");</p>
<p>Double sommePrix = 0;
Double sommeNull = 0;</p>
<p>for (returnedIssue in dataPanelScoringService.getSetOfIssuesByCfName("Total Yes",issue))
{
if(returnedIssue.getCustomFieldValue(criteria)?.value.equals("Yes")){
sommePrix +=returnedIssue.getCustomFieldValue(prix);
}
}</p>
<p>if(sommePrix == 0)
return sommeNull;
else
return sommePrix;
</code>

3. Associate "Total Yes" field to the table:

TableAssociated

Associate a Scripted Field to a table

4. Update the issue and check that the calculation is correct:

TotalYes

The sum is calculated in the panel.

Conclusion

These new functions aim at making Exocet more efficient so it can fully meet your needs : make it easy to create linked issues and  customise the way they will be displayed in their parent issue. Linking issues in JIRA is now simpler than ever.

Try Exocet,  you'll wonder how you ever managed without it !

 

 

  • Hi,

    I would use the datapanel to show the issues that have a specific link (“blocks”) to the current issue.
    I used the JQL : issueFunction in hasLinks(“blocks”)
    However, linked issues that have a link “blocks” to another issue are shown too. How can I avoid ? How can I search on specific links to the current issue (is there some placeholder to be used in the JQL for the current issue ?)