Extending a webwork action in JIRA
There are so many user stories for this one! How do you override some of the JIRA built-in actions? How do you do some additional stuff in the JIRA built-in action? Like doing some crazy things immediately after logging work on a ticket, or doing some innovative validations on some of those actions.
Extending the existing JIRA action is an answer to all these questions. Let us see in detail how to do that.
How to do it…
Extending a JIRA action is done with the help of the webwork plugin module. Most of it is very similar to writing new webwork actions.
Let us take the case of the AddProject
action. What should we do if we need to extend this action? Say, to do some additional validation during the creation of a project?
Let us consider an example where we want to prevent users from creating project keys using reserved words.
The following are the steps to do this:
Identify the action to be overridden by looking up the
actions.xml
file underWEB-INF/classes
in...