Package com.xwiki.jirapro.issuecreate
Class JiraIssueCreationScriptService
java.lang.Object
com.xwiki.jirapro.issuecreate.JiraIssueCreationScriptService
- All Implemented Interfaces:
org.xwiki.script.service.ScriptService
@Component
@Named("jiraIssueCreation")
@Singleton
public class JiraIssueCreationScriptService
extends Object
implements org.xwiki.script.service.ScriptService
Helps XWiki scripts creating Jira issues.
- Version:
- $Id$
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateIssue(String instanceId, String inputData) Create an issue.getAuthenticatorID(String instanceId) Gets the ID of the Authenticator.getFieldsMetadata(String instanceId, String project, String issueType) Get the issue creation fields metadata.suggestAssignableUser(String instanceId, String project, String text) Suggest JIRA Assignable Users to pick from.Suggest JIRA instances to pick from.suggestIssueType(String instanceId, String project, String text) Suggest JIRA issue types to pick from.suggestProject(String instanceId, String text) Suggest JIRA projects to pick from.suggestUser(String instanceId, String text) Suggest JIRA Users to pick from.
-
Constructor Details
-
JiraIssueCreationScriptService
public JiraIssueCreationScriptService()
-
-
Method Details
-
suggestInstance
Suggest JIRA instances to pick from.- Returns:
- The JSON selectize input for an instance suggest
-
getAuthenticatorID
Gets the ID of the Authenticator.- Parameters:
instanceId- the instance to get the Authenticator for.- Returns:
- The ID of the Authenticator if one is configured, an empty string otherwise.
-
suggestProject
Suggest JIRA projects to pick from.- Parameters:
instanceId- the instance the projects should be retrieved fromtext- string that must be contained in the project name or key.- Returns:
- The JSON selectize input for a project suggest
-
suggestIssueType
Suggest JIRA issue types to pick from.- Parameters:
instanceId- the instance the issue types should be retrieved fromproject- the project from which the issue types should be pickedtext- string that must be contained in the issue type name or description.- Returns:
- The JSON selectize input for a issue type suggest
-
suggestAssignableUser
Suggest JIRA Assignable Users to pick from.- Parameters:
instanceId- the instance the Users should be retrieved fromproject- the project for which the users should be assignabletext- search string- Returns:
- The JSON selectize input for an Assignable Users suggest
-
suggestUser
Suggest JIRA Users to pick from.- Parameters:
instanceId- the instance the Users should be retrieved fromtext- search string- Returns:
- The JSON selectize input for an Users suggest
-
getFieldsMetadata
Get the issue creation fields metadata.- Parameters:
instanceId-project-issueType-- Returns:
- The JSON as returned by JIRA
-
createIssue
Create an issue.- Parameters:
inputData- the issue fields as a JSONinstanceId- the instance on which the issue should be created- Returns:
- The JSON as returned by JIRA
-