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

How to extend issue actions in JIRA 5 ?

Nahn Yanootz
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 14, 2013

Hello

I have originally made a plugin for JIRA 4, and now we have upgraded to JIRA 5.

I have re-compiled the plugin for JIRA 5 with the appropriate SDK, and I have found that our extended issue and worklog actions are not working.

For example, in the JIRA 4 plugin, to extend the Create / Edit / Delete issue actions what I would have to do is to add 3 webwork entries with the "CreateIssueDetails", "EditIssue", and "DeleteIssue" aliases. Then I would extend the Java classes with the same name, and override their doValidation() and doExecute() methods.

This approach does not work for JIRA 5.

Can anyone give me a practical example of how to extend issue actions for JIRA 5?

The documentation available doesn't seem to address these things.

Thanks

EDIT 1: to be more specific, I have modified the question to refer only to the issue related actions

EDIT 2: In JIRA 5, the create/edit issue functionalities are handled by QuickCreateIssue and QuickEditIssue. How would I extend these?

3 answers

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
Nahn Yanootz
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.
March 24, 2013

I've found out that the CreateIssue and EditIssue functionalities are handled by QuickEditIssue and QuickCreateIssue in JIRA 5.

These are not system actions, but actions defined in the jira-quick-edit-plugin, a system plugin found in WEB-INF/classes/atlassian-bundled-plugins.zip.

The only solution I've found so far is to look for the jira-quick-edit-plugin folder provided in the JIRA 5 sources archive and edit it directly, then package it as a plugin.

In the edited jira-quick-edit-plugin I would add my own classes and extend the 2 actions mentioned, then I would reference the extended classes instead of the original ones in the atlassian-plugin.xml.

In order to keep the original plugin from running, I would unzip the atlassian-bundled-plugins.zip, remove it, then rezip it.

This is an ugly and not so maintenance-friendly solution (as you always need to edit the JIRA system plugin), so I would appreciate if anybody else would have a better solution.

0 votes
Onkar Ahire
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.
October 14, 2013

Hi All,

Thanks for below discussion,

Can anyone suggest more, I am looking for the same functionality, I am able to execute my action only if my url is http://localhost:2990/jira/secure/CreateIssue.jspa

but not in quick create issue (Type c) .

Can anyone suggest the solution ?

Thanks in advance.

Regards

Onkar Ahire

0 votes
Jobin Kuruvilla [Adaptavist]
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 15, 2013

The reason some of the actions doesn't work just by extending is because they are now part of bundled plugins. You can not override them. You can still override the system actions.

It is best to create your own action extending the old ones, hanging off new web-items, and then disable the system ones.

Nahn Yanootz
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, 2013

Sorry, but I'm a little confused :)

So, I cannot override the actions I've mentioned because they are part of bundled plugins, but I can still override the system actions?

What are the system actions that I can override for my particular case?

Jobin Kuruvilla [Adaptavist]
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 18, 2013

By system actions I meant actions which are in WEB-INF/classes/actions.xml. I haven't looked in your specific case. Note that even if some actions are there in the actions.xml, JIRA now uses REST APIs in some cases, even internally.

You can look through the network calls using developer tools in the browser to see if the action is really called or not.

Nahn Yanootz
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.
March 10, 2013

I've figured out that the EditIssue and CreateIssue actions are substituted by QuickEditIssue and QuickCreateIssue, found in the jira-quick-edit-plugin. (a system plugin)

So, are you saying that, since the QuickEditIssue and QuickCreateIssue actions are not system actions (they're not listed in the actions.xml), there's no way to override them?

Jobin Kuruvilla [Adaptavist]
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.
March 11, 2013

Yes, that's right. You can try writing custom actions wih same alias and disabling the default ones. That might work but I haven't tried it myself.

Nahn Yanootz
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.
March 12, 2013

I tried writing custom actions with same alias but it doesn't work for QuickEditIssue or QuickCreateIssue. It seems that it only works for the actions defined in the actions.xml.

Ahmed_Bilal April 25, 2019

@Nahn Yanootz  Any success with this problem. I am JIRA 7.3.8

TAGS
AUG Leaders

Atlassian Community Events