Class 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 Detail

      • JiraIssueCreationScriptService

        public JiraIssueCreationScriptService()
    • Method Detail

      • suggestInstance

        public String suggestInstance()
        Suggest JIRA instances to pick from.
        Returns:
        The JSON selectize input for an instance suggest
      • getAuthenticatorID

        public String getAuthenticatorID​(String instanceId)
        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

        public String suggestProject​(String instanceId,
                                     String text)
        Suggest JIRA projects to pick from.
        Parameters:
        instanceId - the instance the projects should be retrieved from
        text - string that must be contained in the project name or key.
        Returns:
        The JSON selectize input for a project suggest
      • suggestIssueType

        public String suggestIssueType​(String instanceId,
                                       String project,
                                       String text)
        Suggest JIRA issue types to pick from.
        Parameters:
        instanceId - the instance the issue types should be retrieved from
        project - the project from which the issue types should be picked
        text - string that must be contained in the issue type name or description.
        Returns:
        The JSON selectize input for a issue type suggest
      • suggestAssignableUser

        public String suggestAssignableUser​(String instanceId,
                                            String project,
                                            String text)
        Suggest JIRA Assignable Users to pick from.
        Parameters:
        instanceId - the instance the Users should be retrieved from
        project - the project for which the users should be assignable
        text - search string
        Returns:
        The JSON selectize input for an Assignable Users suggest
      • suggestUser

        public String suggestUser​(String instanceId,
                                  String text)
        Suggest JIRA Users to pick from.
        Parameters:
        instanceId - the instance the Users should be retrieved from
        text - search string
        Returns:
        The JSON selectize input for an Users suggest
      • getFieldsMetadata

        public String getFieldsMetadata​(String instanceId,
                                        String project,
                                        String issueType)
        Get the issue creation fields metadata.
        Parameters:
        instanceId -
        project -
        issueType -
        Returns:
        The JSON as returned by JIRA
      • createIssue

        public String createIssue​(String instanceId,
                                  String inputData)
        Create an issue.
        Parameters:
        inputData - the issue fields as a JSON
        instanceId - the instance on which the issue should be created
        Returns:
        The JSON as returned by JIRA