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

Calling plugin by different methods

Jon Sword
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.
July 11, 2011

Hi,

I am working on an auto-cloning plugin that will create clones in different fix versions based on data pulled from an external application. One of the requirements is to be able to invoke it both manually (as a web-item in the operations bar) or through a transition post-function.

I have found two plugins I have considered basing my plugin on. The JIRA Clone Plus Plugin which operates as a web-item in the operations bar and the JIRA GroovyScript Runner plugin which can clone from a transition post-function, but I would really like a single method to do it both ways.

I am open to thoughts and suggestions on how you might implement such a thing...

P.S. One option I have considered but I am not sure I like would be to add an Auto-Cone transition to every status (transitioning back to the same status). This would allow auto-cloning on demand or when a regular transition called it - my concern with this approach is maintaining the workflow. Thoughts?

Thanks,

Jon

2 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
Colin Goudie
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.
July 11, 2011

I would write the code as a service (not a JIRA service, but just as a concept) registered as a Spring Component in JIRA and then call this from either a Transition or the handler from the web-item.

Jon Sword
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.
July 11, 2011
Thanks Colin,
I have been taking a look at it and so far I like what I see (still have a lot to learn tho!).
Anyone know if there are tutorials or examples I could use to suppliment the docs I found here:
http://confluence.atlassian.com/display/PLUGINFRAMEWORK/_Content+for+Component+Plugin+Module
http://confluence.atlassian.com/display/PLUGINFRAMEWORK/Component+Import+Plugin+Module
J
0 votes
Jon Sword
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.
May 2, 2012

In the end I did use a looping "AutoClone" transition (back to the initial status) to trigger a post-function groovy script. This allowed AutoCloning to be run manually by clicking the AutoClone Transition button or through a normal transition from Status A -> Status B where the post-function was defined.

I never got to try Colin's suggestion, but it sounds reasonable so I will mark it as an answer too.

Thanks Colin.

TAGS
AUG Leaders

Atlassian Community Events