Validations on issue linking
There are scenarios that we might come across where we need to do extra validations while linking. In this recipe, we will quickly look at adding some extra validations by extending the existing link issue action in JIRA.
Getting Ready...
Create a Skeleton plugin using Atlassian Plugin SDK. It is recommended to read the Extending JIRA actions recipe before proceeding.
How to do it...
As we have seen while extending JIRA actions, all we need to do here is to create a new webwork action that extends the existing JIRA action and override the required method. In this specific case, will be overriding the doValidation()
method to do some extra validation.
Let us, for example, consider that we want to restrict linking to all issues of type New Feature. Following are the steps to do the same.
Add a new webwork module in the
atlassian-plugin.xml
with a new action class and the same alias as JIRA's link action,LinkExistingIssue
. Once we do that, the new action class will...