JIRA class injection in plugin

Hi,

I'm trying to create new project tab panel (replace the JIRA original existing one with my own) in our plugin, and I need some of the original funcionality in the new one (i.e.: some of the fragments, fragment menus). The problem is that while the class injection works fine for the original JIRA tab (classes for some of the classes) the classes don't get initialized for the plugin. I don't want to implement these fragments for my plugin as I need changes on a whole tab panel and no changes on fragments. I get this exception

org.springframework.beans.factory.NoSuchBeanDefinitionException

when I put this class as parameter to constructor. Is there some simple way to make my plugin inject JIRA classes? If so what are the steps I should do?

Thank you in advance for any help.

2 answers

1 accepted

Accepted Answer
0 votes

So the problem is solved. I did a little error when trying to import these components. As more components can have one interface it is necessary to do it with the component object itself not through it's interface. As for atlassian's own classes it is only necessary to use "component" module, i.e.:

<component key="dueIssuesFragment" name="Due Issues Fragment" 
    		   class="com.atlassian.jira.plugin.projectpanel.fragment.impl.DueIssuesFragment">
	<decription>Due Issues Fragment</decription>
</component>

This however does not work for ALL the JIRA fragments (classes). If anyone knows why, let us know so that we can expand our knowledge.

Are you using component-import in your atlassian-plugin.xml ?

https://developer.atlassian.com/display/JIRADEV/Component+Import+Plugin+Module

Suggest an answer

Log in or Sign up to answer
Community showcase
Published yesterday in Jira Ops

Jira Ops Early Access Program Update #1: Announcing our next feature and a new integration

Thanks for signing up for Jira Ops! I’m Matt Ryall, leader for the Jira Ops product team at Atlassian. Since this is a brand new product, we’ll be delivering improvements quickly and sharing updates...

253 views 0 6
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