Issue Linked Event for Jira



About plugin

Issue Linked Event provide two functionality for JIRA.

  • Ability to validate linked issues (read Validation strategy in Configuration section)
  • Fire the custom events when someone created or deleted issue links


Plugin add two custom events into JIRA (Administration – System – View Events). Events will be fired when you create JIRA, Web, Confluence link or when you delete any link from issue.

  • “Issue Link Created” event
  • “Issue Link Deleted” event

You can change template, assciated notification schemes, associated workflows and description, but remember … DON’T CHANGE EVENTS NAME.

If you change it, the plugin will create new events!.

The default setting for new events can be seen below.












Configuration

Go do -> Add-ons -> Issue Linked Event (Other section in left menu)

  1. Call custom Created/Deleted events?

    You can disable or enable custome events

  2. Call event only for current issue?

    For example if you checked “only for current issue” option and you try add new issue link, event will be fired only for current issue, but if you checked “current and linked issues” option, event will be fired for current and linked issue.

  3. Validation strategy

    You can create rules for linked issues how will they be validated, for example: only Bug can be linked into Task with relation “is blocked by”

SUPPORTED JQLDESCRIPTIONEXAMPLE
sourceLinkFilterX(GLOBAL_LINK_NAME)JQL provide information how to validate outward issues

JQL name: sourceLinkFilter1(Relates)
JQL query: issuetyp = Epic and status = “TO DO”

Whats that mean?
All issues in outward “Relates” link relation must be a “Epic” in “TO DO” status

destLinkFilterX(GLOBAL_LINK_NAME)JQL provide information how to validate inward issuesJQL name: destLinkFilter1(Blocks)
JQL query: issuetyp = BugWhats that mean?
All issues in inward “Blocks” link relation must be a “Bug”

errorLinkFilterX(GLOBAL_LINK_NAME)


Only for strategy: All validation must by positive

JQL provide information about error messages when validate not pass.

Default error message when valiadation fail or JQL is not set:
You can’t link this issue/issues due to the link restrictions.

JQL name: errorLinkFilter1(Blocks)
JQL query: summary ~ “Example error message for pair 1”

Whats that mean?
This is message to show, when validation for first pair not pass.

errorLinkFilter(GLOBAL_LINK_NAME)


Only for strategy: Only one validation must by positive

JQL provide information about error message when validate not pass.

Default error message when valiadation fail or JQL is not set:
You can’t link this issue/issues due to the link restrictions.

JQL name: errorLinkFilter(Blocks)
JQL query: summary ~ “Example error message for only one validation must by positive”

Whats that mean?
This is message to show, when validations for linked issues not pass

X – number from 1 to 10
GLOBAL_LINK_NAME – global link name, please see Name on page {JIRA_URL}/secure/admin/ViewLinkTypes!default.jspa

Example:



Event params map

Issue Link Created/Deleted events has information about which links have been added or removed.

You can get it using method getParams form class com.atlassian.jira.event.issue.IssueEvent.

Example data in params

Add issue/remote link param

Removed issue link param

Removed remote link param



How to show it?

I will try to show the plugin in action using script listener and several screenshot from issue actions

and how i set listener in JIRA (using Script Runner)



FAQ

Where in Jira create JQL?

Create JQL in standard JIRA place where you search issue or create JQL’s for filters/gadgets.
Issue (top-menu) -> Current Search or Search for Issues
Now save JQL using specific name for chosen validation strategy.


Saved filter need to be a public?

No


What, if I added several filters with the same name?

If you added several filters with the same name, plugin find first added into JIRA and check only this one, the rest will be ignored (first added into JIRA = lowest id in database)




Support

If you have any questions or suggestions please don’t hesitate to contact me.

Please feel free to contact by email support@itlab.net.pl or JIRA Service Desk, if you require any further information.