Monday, January 11, 2010

Project properties of JIRA

Currently, I am doing plugin development of JIRA. A request of my friend in hongkong. The functionality of this plugin is to clone the existing project with all the issues and the configuration of the project. Thus, this project will be akin of template to create 'real' project.

One interesting part of developing this plugin is cloning the issue type scheme. As we know that JIRA has issue type scheme to differentiate the type of the issue. JIRA divides the issue type scheme to be global and not global. By default, the global issue type scheme is Default Issue Type Scheme. But, strange thing is happening when I try to fetch the entity of Default Issue Type Scheme. When I use the following line to get the entity:

FieldConfigScheme fieldConfigScheme = issueTypeSchemeManager.getConfigScheme(existingProject);

and the above result is checked against the isGlobal() method of object fieldConfigScheme. The result is false which I think, it is supposed to be true. However, what i did to solve the problem is to check the object against the default fieldConfigScheme and it works.