How to retrieve JIRA Agile Bean in Script Runner?

Hi, The documentation says Jira Agile bean can be retrieved with @JiraAgileBean annotation - https://jamieechlin.atlassian.net/wiki/display/GRV/Working+With+JIRA+Agile Will it work only for beans from Jira Agile public Java API or any internal service too? Thanks, Vasiliy

4 answers

1 accepted

This widget could not be displayed.

Thanks Jamie, I checked the documentation and tried @JiraAgileBean on practice - it works perfectly for all JiraAgile components, amazing! ) I spent a lot of time on trying to achieve the same playing with Spring contects, OSGi imports and so on but failed. May be you could share briefly the approach you used so that it can be reproduced in any third-party JIRA plugin development? Regards, Vasiliy

It involves leaping from one private field to another until you get the application context. I have actually posted details in a previous question... in java it would be the same but using reflection, and setting private fields as accessible etc. If I find a better way I will replace it, but I don't think it's going to happen until the JA folks decide they actually want a public API.

Yes, I've done something like you've mentioned using existing public API and accessing private fields which represented hidden services which I needed. But it has limitation cause again the set of that fields is quite limited. Getting any service like you do even being some hack approach is the only possible, indeed. You've mentioned you've posted the details on some other question - I tried to search but seems didn't managed to find it. If you could add a link to it here, that would be great.

This widget could not be displayed.

Should work with any internal service too.

This widget could not be displayed.

Thank you, Jamie

If it works that way then it will save me a lot of time )

Will check it on practice and share the results here

This widget could not be displayed.

JiraAgileBean annotation does the magic of retrieving any JiraAgile bean unlike component-import in P2 plugin atlassian.xml

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 22, 2018 in Marketplace Apps

How a Marketplace app tech team is achieving gender diversity

Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...

435 views 3 17
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you