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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,556,653
Community Members
 
Community Events
184
Community Groups

adding issue type using plugin

I am trying to add issue type using plugin i am very much new to jira plugin development could not get much support from online
This is my java class

import com.atlassian.jira.config.IssueTypeManager;
import com.atlassian.jira.issue.issuetype.IssueType;
import com.atlassian.plugin.spring.scanner.annotation.export.ExportAsService;
import com.atlassian.plugin.spring.scanner.annotation.imports.ComponentImport;
import com.atlassian.sal.api.ApplicationProperties;
import com.testcase.plugin.api.MyPluginComponent;

import javax.inject.Inject;
import javax.inject.Named;

@ExportAsService ({MyPluginComponent.class})
@Named ("myPluginComponent")
public class MyPluginComponentImpl implements MyPluginComponent
{
IssueTypeManager issueTypeManager;
@ComponentImport
private final ApplicationProperties applicationProperties;
// Create issue type:
IssueType myIssueType = this.issueTypeManager.createIssueType("Test Case", "Test case managment issue type", (long)1);

@Inject
public MyPluginComponentImpl(final ApplicationProperties applicationProperties)
{
this.applicationProperties = applicationProperties;
}

public String getName()
{
if(null != applicationProperties)
{
return "myComponent:" + applicationProperties.getDisplayName();
}

return "myComponent";
}
}


and an entry in plugin.xml

<component-import key="applicationProperties" interface="com.atlassian.sal.api.ApplicationProperties" />

do we need to configure the java class "MyPluginComponentImpl " entry in plugin.xml ?

Please help me to address this issue

1 comment

RambanamP
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.
Aug 02, 2017

before asnswering your question, would like to understand,

why you want create issue type using api?  why can't you create manually?

when you want to create new issue type using api?

I am planning to develop test case managment plugin as part of this i want to create issue type+screens+ work flows 

i dont want to do customizations in jira prefred to develop plugin 

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events