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

JIRA API changes between JIRA 4.2 and JIRA 4.4

Anandhi A January 6, 2013

Hi,

I am migrating my JIRA 4.2 to JIRA 4.4. I have a few custom plugins which donot work properly in JIRA 4.4, since they were developed to be compatible with JIRA 4.2.

I updated the pom.xml with <jira.version> as 4.4 and <jira.data.version> as 4.4. Then i got a few errors.

The type com.atlassian.crowd.embedded.api.User cannot be resolved.

I cant find this class in any jar. Can you help me find a jar this class???

I read that i should change some APIs like "com.opensymphony.user.User". Can you tell me what are the other deprected APIs that should be changed to make my plugin work in JIRA 4.4??

Thanks in advance....

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 6, 2013

You've already spotted the main one you need to change, and you're looking at the right answer - users are now managed by com.atlassian.crowd, so you need to include the right dependencies and apis.

Rather than try to debug why it's not working by hand, you might find it easier to

  • Generate a clean, empty plugin using atlas-create-jira-4-plugin, and then compare the pom.xml that is generated for you with your existing pom.xml. It shouldn't be that different, but check the dependencies and the versions of things they use.
  • Open the project in an IDE - Eclipse, IDEA, Netbeans, anything that does basic syntax and library/dependency checking will do - all three that I've just mentioned will be able to find com.atlassian.crowd stuff for you, assuming your pom has the basics right.

You might also want to check over the use of componentmanager and componentaccessor if you've used them. I've converted a load of Jira 3.3 and 4.1 plugins to 5.x recently and the users and componentmanagers were the only two things that cropped up more than once.

Anandhi A January 7, 2013

Thanks Nic....I got the correct pom.xml....:):)

Anandhi A January 8, 2013

I am modifying the java source code of my custom plugins(developed for JIRA 4.2) to suite JIRA 4.4. Here is a code snippet

FieldVisibilityBean fieldvisibilitybean = new FieldVisibilityBean();

isHidden = fieldvisibilitybean.isFieldHidden(field.getId(), issue);

But i find that FieldVisibilityBean is deprecated in JIRA 4.4. When i searched the docs, it said

You should get a FieldVisibilityManager dependency injected via PICO rather than creating one of these manually. This class will not be availables via dependency injection in the future. Since v4.0

What should i use instead of this FieldVisibilityBean....How to inject dependency using PICO container???

Thanks in advance...

TAGS
AUG Leaders

Atlassian Community Events