public class

JiraConnector

extends Object
java.lang.Object
   ↳ org.mule.module.jira.JiraConnector
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

JIRA is a proprietary issue tracking product, developed by Atlassian, commonly used for bug tracking, issue tracking, and project management.

Summary

Fields
private String address The JIRA Server Soap address.
private JiraClient<List<Object>> client
private String password The user login password
private String username The user login username
Public Constructors
JiraConnector()
Public Methods
void addActorsToProjectRole(String token, List<String> actors, Long projectRoleId, String projectKey, String actorType)
Adds the given actors to the project role.
boolean addBase64EncodedAttachmentsToIssue(String token, String issueKey, List<String> fileNames, List<String> base64EncodedAttachmentData)
An alternative mechanism for adding attachments to an issue.
void addComment(String token, String issueKey, String commentAuthor, String commentBody, String commentGroupLevel, String commentRoleLevel)
Adds a new comment to the issue.
void addDefaultActorsToProjectRole(String token, List<String> actors, Long projectRoleId, String type)
Adds the default actors to the project role denoted by this id.
RemotePermissionScheme addPermissionTo(String token, String permissionSchemeName, Long permissionCode, String entityName)
Adds the permission to the given entity name (username or group name)

void addUserToGroup(String token, String groupName, String userName)
Adds a user to the given group name.
RemoteVersion addVersion(String token, String projectKey, String versionName, Boolean archived, Boolean released, String releaseDate)
Adds a new version

void archiveVersion(String token, String projectKey, String versionName, Boolean archive)
Archieves the given version/

RemoteGroup createGroup(String token, String groupName, String userName)
Creates a group with the given name optionally adding the given user to it.
RemoteIssue createIssue(String token, String assignee, String summary, String description, String dueDate, String environment, String priority, String project, String reporter, String type, Long votes, Map<String, List<String>> customFields)
Creates an issue.
RemoteIssue createIssueWithSecurityLevel(String token, String assignee, String summary, String description, String dueDate, String environment, String priority, String project, String reporter, String type, Long votes, Map<String, List<String>> customFields, Long securityLevelId)
Creates an issue using the the security level denoted by the given id.
RemotePermissionScheme createPermissionScheme(String token, String name, String description)
Creates a new permission schema using the given name and description.
RemoteProject createProject(String token, String key, String name, String description, String url, String lead, String permissionSchemeName, String notificationSchemeName, String securityShemeName)
Creates a new project

RemoteProjectRole createProjectRole(String token, String projectRoleName, String projectRoleDescription)
Creates a new project role.
RemoteUser createUser(String token, String username, String password, String fullName, String email)
Creates a user in JIRA with the specified user details

void deleteGroup(String token, String groupName, String swapGroupName)
Deletes the group denoted by the given group name.
void deleteIssue(String token, String issueKey)
Deletes the issue with the given key

RemotePermissionScheme deletePermissionFrom(String token, String permissionSchemeName, Long permissionCode, String entityName)
Removes the permission to the given entity name (username or group name)

void deletePermissionScheme(String token, String permissionSchemeName)
Deletes the permission scheme denoted by the given name

void deleteProject(String token, String projectKey)
Deletes the project represented by the given project key.
void deleteProjectAvatar(String token, Long avatarId)
Deletes the given custom Avatar from the system.
void deleteProjectRole(String token, Long projectRoleId, Boolean confirm)
Deletes the project role denoted by the given project role id.
void deleteUser(String token, String username)
Deletes a user in JIRA with the specified username.
void deleteWorklogAndAutoAdjustRemainingEstimate(String token, String worklogId)
Deletes the worklog with the given id and updates the remaining estimate field on the isssue by increasing it by the time spent amount on the worklog being deleted.
void deleteWorklogAndRetainRemainingEstimate(String token, String worklogId)
Deletes the worklog with the given id but leaves the remaining estimate field on the isssue unchanged.
void deleteWorklogWithNewRemainingEstimate(String token, String workLogId, String newRemainingEstimate)
Deletes the worklog with the given id and sets the remaining estimate field on the isssue to the given value.
RemoteComment editComment(String token, Long commentId, String body, String updateAuthor)
Edits the comment denoted by the given id

String getAddress()
List<Object> getAllPermissions(String token)
Returns all the permissions.
List<Object> getAssociatedNotificationSchemes(String token, Long projectRoleId)
Returns the associated notification schemes for the given project role.
List<Object> getAssociatedPermissionSchemes(String token, Long projectRoleId)
Returns the associated permission schemas for the given project role.
List<Object> getAttachmentsFromIssue(String token, String issueKey)
Returns the attachments for the issue denoted by the given key.
List<Object> getAvailableActions(String token, String issueKey)
Finds the available actions for the given issue key

synchronized JiraClient<List<Object>> getClient()
RemoteComment getComment(String token, Long commentId)
Finds a comment.
List<Object> getComments(String token, String issueKey)
Returns the comments for the issue denoted by the given key.
List<Object> getComponents(String token, String projectKey)
Returns an array of all the components for the specified project key.
RemoteConfiguration getConfiguration(String token)
Returns information about the current configuration of JIRA.
List<Object> getCustomFields(String token)
Returns the custom fields for the current user

RemoteRoleActors getDefaultRoleActors(String token, Long projectRoleId)
Returns the default role actors for the given project role id.
List<Object> getFavouriteFilters(String token)
This retreives a list of the currently logged in user's favourite fitlers.
List<Object> getFieldsForAction(String token, String issueKey, String actionIdString)
Returns the fields for the given action.
List<Object> getFieldsForEdit(String token, String issueKey)
Returns the fields for edit for the given issue key

RemoteGroup getGroup(String token, String groupName)
Find the group with the specified name in JIRA.
RemoteIssue getIssue(String token, String issueKey)
Finds an issue by key.
RemoteIssue getIssueById(String token, String issueId)
Returns the issue for the given issue id.
long getIssueCountForFilter(String token, String filterId)
Returns the issue count for the filter denoted by this id.
List<Object> getIssueTypes(String token)
Returns an array of all the issue types for all projects in JIRA.
List<Object> getIssueTypesForProject(String token, String projectId)
Returns an array of all the (non-sub task) issue types for the specified project id.
List<Object> getIssuesFromFilterWithLimit(String token, String filterId, Integer offset, Integer maxNumResults)
Returns issues that match the saved filter specified by the filterId.
List<Object> getIssuesFromJqlSearch(String token, String jqlSearch, Integer maxNumResults)
Execute a specified JQL query and return the resulting issues.
List<Object> getIssuesFromTextSearchWithLimit(String token, String searchTerms, Integer offset, Integer maxNumResults)
Returns issues containing searchTerms.
List<Object> getIssuesFromTextSearchWithProject(String token, List<String> projectKeys, String searchTerms, Integer maxNumResults)
Returns issues containing searchTerms that are within the specified projects.
List<Object> getNotificationSchemes(String token)
Returns notification schemes.
String getPassword()
List<Object> getPermissionSchemes(String token)
Returns the permission schemes.
List<Object> getPriorities(String token)
Returns an array of all the issue statuses in JIRA.
RemoteAvatar getProjectAvatar(String token, String projectKey)
Retrieves the current avatar for the given project.
List<Object> getProjectAvatars(String token, String projectKey, Boolean includeSystemAvatars)
Retrieves avatars for the given project.
RemoteProject getProjectById(String token, Long projectId)
Returns the Project with the matching id (if the user has permission to browse it).
RemoteProject getProjectByKey(String token, String projectKey)
Returns the Project with the matching key (if the user has permission to browse it).
RemoteProjectRole getProjectRole(String token, Long projectRoleId)
Returns the project role by projectRoleId.
RemoteProjectRoleActors getProjectRoleActors(String token, Long projectRoleId, String projectKey)
Returns the project role actors for the given project

List<Object> getProjectRoles(String token)
Returns the project roles.
RemoteProject getProjectWithSchemesById(String token, Long projectId)
Returns the Project with the matching id (if the user has permission to browse it) with notification, issue security and permission schemes attached.
List<Object> getProjectsNoSchemes(String token)
Returns an array of all the Projects defined in JIRA.
Calendar getResolutionDateById(String token, Long issueId)
Given an issue id, this method returns the resolution date for this issue.
Calendar getResolutionDateByKey(String token, String issueKey)
Given an issue key, this method returns the resolution date for this issue.
List<Object> getResolutions(String token)
Returns an array of all the issue resolutions in JIRA.
RemoteSecurityLevel getSecurityLevel(String token, String issueKey)
Returns the current security level for given issue

List<Object> getSecurityLevels(String token, String projectKey)
Returns an array of all security levels for a given project.
List<Object> getSecuritySchemes(String token)
Returns the security schemes.
RemoteServerInfo getServerInfo(String token)
Returns information about the server JIRA is running on including build number and base URL.
List<Object> getStatuses(String token)
Returns an array of all the issue statuses in JIRA.
List<Object> getSubTaskIssueTypes(String token)
Returns an array of all the sub task issue types in JIRA.
List<Object> getSubTaskIssueTypesForProject(String token, String projectId)
Returns an array of all the sub task issue types for the specified project id.
RemoteUser getUser(String token, String username)
Returns information about a user defined to JIRA.
String getUsername()
List<Object> getVersions(String token, String projectKey)
Returns an array of all the versions for the specified project key.
List<Object> getWorklogs(String token, String issueKey)
Returns all worklogs for the given issue.
boolean hasPermissionToCreateWorklog(String token, String issueKey)
Determines if the user has the permission to add worklogs to the specified issue, that timetracking is enabled in JIRA and that the specified issue is in an editable workflow state.
boolean hasPermissionToDeleteWorklog(String token, String worklogId)
Determine whether the current user has the permission to delete the supplied worklog, that timetracking is enabled in JIRA and that the associated issue is in an editable workflow state.
boolean hasPermissionToEditComment(String token, Long commentId)
Returns whether the current user has permissions to edit the comment denoted by the given id.
boolean hasPermissionToUpdateWorklog(String token, String worklogId)
Determine whether the current user has the permission to update the supplied worklog, that timetracking is enabled in JIRA and that the associated issue is in an editable workflow state.
boolean isProjectRoleNameUnique(String token, String name)
Checks if the given project role name is unique.
String login(String username, String password)
Log in using the given credentials, it returns the authentication token.
boolean logout(String token)
Cleans up an authentication token that was previously created with a call to login

RemoteIssue progressWorkflowAction(String token, String issueKey, String actionIdString, Map<String, List<String>> fields)
This will progress an issue through a workflow.
void refreshCustomFields(String token)
Refreshs custom fields for the current user.
void releaseVersion(String token, String projectKey, String versionName)
Releases the version denoted by the given name

void removeActorsFromProjectRole(String token, List<String> actors, Long projectRoleId, String projectKey, String actorType)
Removes the given actors from the project role

void removeAllRoleActorsByNameAndType(String token, String name, String type)
Removes all role actors using the given name and type.
void removeAllRoleActorsByProject(String token, String projectKey)
Removes all role actors for the given project key.
void removeDefaultActorsFromProjectRole(String token, List<String> actors, Long remoteProjectRoleId, String type)
Removes the default actors from the project role denoted by this id.
void removeUserFromGroup(String token, String groupName, String userName)
Removes a user from the group name.
void setAddress(String address)
void setClient(JiraClient<?> client)
void setNewProjectAvatar(String token, String projectKey, String contentType, String base64ImageData)
Creates a new custom avatar for the given project and sets it to be current for the project.
void setPassword(String password)
void setProjectAvatar(String token, String projectKey, Long avatarId)
Sets the current avatar for the given project to that with the given id.
void setUsername(String username)
RemoteGroup updateGroup(String token, String groupName, List<String> usernames)
Updates the given group name with the provided users.
RemoteIssue updateIssue(String token, String issueKey, Map<String, List<String>> fields)
This will update an issue with new values.
RemoteProject updateProject(String token, String key, String description, String url, String lead, String permissionSchemeName, String notificationSchemeName, String securityShemeName)
Updates the project denoted by the given key.
void updateProjectRole(String token, Long projectRoleId, String projectRoleName, String projectRoleDescription)
Updates the project role with the given id.
void updateWorklogWithNewRemainingEstimate(String token, String issueKey, String worklogId, String newRemainingEstimate, String comment, String groupLevel, String roleLevelId)
Modifies the worklog with the id of the given worklog, updating its fields to match the given worklog and sets the remaining estimate field on the relevant issue to the given value.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

private String address

The JIRA Server Soap address. It usually looks like https://<jira server hostname>/rpc/soap/jirasoapservice-v2 or http://<jira server hostname>/rpc/soap/jirasoapservice-v2

private JiraClient<List<Object>> client

private String password

The user login password

private String username

The user login username

Public Constructors

public JiraConnector ()

Public Methods

public void addActorsToProjectRole (String token, List<String> actors, Long projectRoleId, String projectKey, String actorType)

Adds the given actors to the project role.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
actors The actors to add
projectRoleId The id of the project role to use
projectKey The key of project to use
actorType The actor type to use

public boolean addBase64EncodedAttachmentsToIssue (String token, String issueKey, List<String> fileNames, List<String> base64EncodedAttachmentData)

An alternative mechanism for adding attachments to an issue. This method accepts the data of the attachments as Base64 encoded strings instead of byte arrays. This is to combat the XML message bloat created by Axis when SOAP-ifying byte arrays. For more information, please see JRA-11693.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
issueKey The issue to attach to
fileNames An array of filenames; each element names an attachment to be uploaded
base64EncodedAttachmentData An array of Base 64 encoded Strings; each element contains the data of the attachment to be uploaded
Returns
  • true if attachments were successfully added; if the operation was not successful, an exception would be thrown

public void addComment (String token, String issueKey, String commentAuthor, String commentBody, String commentGroupLevel, String commentRoleLevel)

Adds a new comment to the issue.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
issueKey The key of the issue
commentAuthor The author of the comment
commentBody The body of the comment
commentGroupLevel The group level of the comment
commentRoleLevel The role level of the comment

public void addDefaultActorsToProjectRole (String token, List<String> actors, Long projectRoleId, String type)

Adds the default actors to the project role denoted by this id.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
actors The actors to add
projectRoleId The id of the project role
type The type

public RemotePermissionScheme addPermissionTo (String token, String permissionSchemeName, Long permissionCode, String entityName)

Adds the permission to the given entity name (username or group name)

Parameters
token Optionally provide a token to use, if not provided username and password will be used
permissionSchemeName The name of the permission scheme to use
permissionCode The permission code to use
entityName The entity name, username or group name
Returns
  • the modified permission scheme

public void addUserToGroup (String token, String groupName, String userName)

Adds a user to the given group name.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
groupName The group name
userName The user name

public RemoteVersion addVersion (String token, String projectKey, String versionName, Boolean archived, Boolean released, String releaseDate)

Adds a new version

Parameters
token Optionally provide a token to use, if not provided username and password will be used
projectKey The project key to use
versionName The version name to use
archived Whether is archived
released Whether is released
releaseDate The release date to use in the format MM-dd-yyy'T'HH:mm:ss
Returns
  • the new version

public void archiveVersion (String token, String projectKey, String versionName, Boolean archive)

Archieves the given version/

Parameters
token Optionally provide a token to use, if not provided username and password will be used
projectKey The project key to use
versionName The version name to use
archive Whether it should be archived

public RemoteGroup createGroup (String token, String groupName, String userName)

Creates a group with the given name optionally adding the given user to it.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
groupName The name of the group to create.
userName The user to add to the group (if null, no user will be added).
Returns
  • the RemoteGroup created

public RemoteIssue createIssue (String token, String assignee, String summary, String description, String dueDate, String environment, String priority, String project, String reporter, String type, Long votes, Map<String, List<String>> customFields)

Creates an issue.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
assignee The assignee of the new issue
summary The summary of the new issue
description The description of the new issue
dueDate The due date of the new issue using the format MM-dd-yyy'T'HH:mm:ss
environment The environment of the new issue
priority The priority of the new issue
project The project of the new issue
reporter The reporter of the new issue
type The type of the new issue
votes The votes of the new issue
customFields The custom fields of the new issue, the keys of the map are the field ids
Returns
  • the new created issue

public RemoteIssue createIssueWithSecurityLevel (String token, String assignee, String summary, String description, String dueDate, String environment, String priority, String project, String reporter, String type, Long votes, Map<String, List<String>> customFields, Long securityLevelId)

Creates an issue using the the security level denoted by the given id.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
assignee The assignee of the new issue
summary The summary of the new issue
description The description of the new issue
dueDate The due date of the new issue using the format MM-dd-yyy'T'HH:mm:ss
environment The environment of the new issue
priority The priority of the new issue
project The project of the new issue
reporter The reporter of the new issue
type The type of the new issue
votes The votes of the new issue
customFields The custom fields of the new issue, the keys of the map are the field ids
securityLevelId The id of the security level to use
Returns
  • the new created issue

public RemotePermissionScheme createPermissionScheme (String token, String name, String description)

Creates a new permission schema using the given name and description.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
name The name of the new permission scheme
description The description of the new permission scheme
Returns
  • the created permission scheme

public RemoteProject createProject (String token, String key, String name, String description, String url, String lead, String permissionSchemeName, String notificationSchemeName, String securityShemeName)

Creates a new project

Parameters
token Optionally provide a token to use, if not provided username and password will be used
key The key for the new project
name The name for the new project
description The description for the new project
url The url for the new project
lead The lead of the new project
permissionSchemeName The name of the permission scheme for the new project
notificationSchemeName The name of the notification scheme for the new project
securityShemeName The name of the security scheme for the new project
Returns
  • the new project

public RemoteProjectRole createProjectRole (String token, String projectRoleName, String projectRoleDescription)

Creates a new project role.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
projectRoleName The name of the new project role
projectRoleDescription The description of the new project role
Returns
  • the created project role

public RemoteUser createUser (String token, String username, String password, String fullName, String email)

Creates a user in JIRA with the specified user details

Parameters
token Optionally provide a token to use, if not provided username and password will be used
username The user name to create
password The password for the new user
fullName The full name of the new user
email The email of the new user
Returns
  • the newly created RemoteUser

public void deleteGroup (String token, String groupName, String swapGroupName)

Deletes the group denoted by the given group name.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
groupName The group name to use
swapGroupName The swap group name to use

public void deleteIssue (String token, String issueKey)

Deletes the issue with the given key

Parameters
token Optionally provide a token to use, if not provided username and password will be used
issueKey The key of the issue to delete

public RemotePermissionScheme deletePermissionFrom (String token, String permissionSchemeName, Long permissionCode, String entityName)

Removes the permission to the given entity name (username or group name)

Parameters
token Optionally provide a token to use, if not provided username and password will be used
permissionSchemeName The name of the permission scheme to use
permissionCode The permission code to use
entityName The entity name, username or group name
Returns
  • the modified permission scheme

public void deletePermissionScheme (String token, String permissionSchemeName)

Deletes the permission scheme denoted by the given name

Parameters
token Optionally provide a token to use, if not provided username and password will be used
permissionSchemeName The name of the permission scheme to delete

public void deleteProject (String token, String projectKey)

Deletes the project represented by the given project key.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
projectKey The key of the project to delete

public void deleteProjectAvatar (String token, Long avatarId)

Deletes the given custom Avatar from the system. System avatars cannot be deleted. Project administration permission is required.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
avatarId Id of the custom avatar to delete.

public void deleteProjectRole (String token, Long projectRoleId, Boolean confirm)

Deletes the project role denoted by the given project role id.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
projectRoleId The id of the project role to delete
confirm Whether confirm

public void deleteUser (String token, String username)

Deletes a user in JIRA with the specified username.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
username The user name to delete

public void deleteWorklogAndAutoAdjustRemainingEstimate (String token, String worklogId)

Deletes the worklog with the given id and updates the remaining estimate field on the isssue by increasing it by the time spent amount on the worklog being deleted. The time spent field of the issue is reduced by the time spent amount on the worklog being deleted.

Parameters
token Optionally provide a token to use, if not provided username and password will be used the SOAP auth token.
worklogId The id of the worklog to delete.

public void deleteWorklogAndRetainRemainingEstimate (String token, String worklogId)

Deletes the worklog with the given id but leaves the remaining estimate field on the isssue unchanged. The time spent field of the issue is reduced by the time spent amount on the worklog being deleted.

Parameters
token Optionally provide a token to use, if not provided username and password will be used the SOAP auth token.
worklogId The id of the worklog to delete.

public void deleteWorklogWithNewRemainingEstimate (String token, String workLogId, String newRemainingEstimate)

Deletes the worklog with the given id and sets the remaining estimate field on the isssue to the given value. The time spent field of the issue is reduced by the time spent amount on the worklog being deleted.

Parameters
token Optionally provide a token to use, if not provided username and password will be used the SOAP auth token.
workLogId The id of the worklog to delete.
newRemainingEstimate The new value for the issue's remaining estimate as a duration string, eg 1d 2h.

public RemoteComment editComment (String token, Long commentId, String body, String updateAuthor)

Edits the comment denoted by the given id

Parameters
token Optionally provide a token to use, if not provided username and password will be used
commentId The id of the comment to edit
body The updated body comment
updateAuthor The update author
Returns
  • the edited comment

public String getAddress ()

public List<Object> getAllPermissions (String token)

Returns all the permissions.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
Returns
  • all the permissions

public List<Object> getAssociatedNotificationSchemes (String token, Long projectRoleId)

Returns the associated notification schemes for the given project role.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
projectRoleId The project role to search
Returns
  • the associated notification schemes for the given project role.

public List<Object> getAssociatedPermissionSchemes (String token, Long projectRoleId)

Returns the associated permission schemas for the given project role.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
projectRoleId The project role to search
Returns
  • the associated permission schemas for the given project role.

public List<Object> getAttachmentsFromIssue (String token, String issueKey)

Returns the attachments for the issue denoted by the given key.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
issueKey The issue key to use
Returns
  • the attachments for the issue denoted by the given key.

public List<Object> getAvailableActions (String token, String issueKey)

Finds the available actions for the given issue key

Parameters
token Optionally provide a token to use, if not provided username and password will be used
issueKey The key of the issue
Returns
  • the available actions for the given issue key

public synchronized JiraClient<List<Object>> getClient ()

public RemoteComment getComment (String token, Long commentId)

Finds a comment.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
commentId The commentId of the comment
Returns
  • the RemoteComment

public List<Object> getComments (String token, String issueKey)

Returns the comments for the issue denoted by the given key.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
issueKey The key of the issue to get the comments for
Returns
  • the comments for the issue denoted by the given key.

public List<Object> getComponents (String token, String projectKey)

Returns an array of all the components for the specified project key.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
projectKey The key of the requested project
Returns
  • an array of RemoteComponent objects

public RemoteConfiguration getConfiguration (String token)

Returns information about the current configuration of JIRA.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
Returns
  • a RemoteConfiguration object which contains information about the current configuration of JIRA.

public List<Object> getCustomFields (String token)

Returns the custom fields for the current user

Parameters
token Optionally provide a token to use, if not provided username and password will be used
Returns
  • the custom fields for the current user

public RemoteRoleActors getDefaultRoleActors (String token, Long projectRoleId)

Returns the default role actors for the given project role id.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
projectRoleId The id of the project role
Returns
  • the default role actors for the given project role id.

public List<Object> getFavouriteFilters (String token)

This retreives a list of the currently logged in user's favourite fitlers.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
Returns
  • a list of the currently logged in user's favourite fitlers.

public List<Object> getFieldsForAction (String token, String issueKey, String actionIdString)

Returns the fields for the given action.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
issueKey The issue key to use
actionIdString The action id to use
Returns
  • the fields for the given action

public List<Object> getFieldsForEdit (String token, String issueKey)

Returns the fields for edit for the given issue key

Parameters
token Optionally provide a token to use, if not provided username and password will be used
issueKey The issue key to get the fields for
Returns
  • the fields for edit

public RemoteGroup getGroup (String token, String groupName)

Find the group with the specified name in JIRA.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
groupName The name of the group to find
Returns
  • a RemoteGroup object for the found group or null if it cant be found.

public RemoteIssue getIssue (String token, String issueKey)

Finds an issue by key.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
issueKey The key of the issue to find.
Returns
  • the issue matching the given key.

public RemoteIssue getIssueById (String token, String issueId)

Returns the issue for the given issue id.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
issueId The issue id to use
Returns
  • the issue for the given issue id.

public long getIssueCountForFilter (String token, String filterId)

Returns the issue count for the filter denoted by this id.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
filterId The fiter id to use
Returns
  • the issue count for the filter denoted by this id.

public List<Object> getIssueTypes (String token)

Returns an array of all the issue types for all projects in JIRA.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
Returns
  • an array of RemoteIssueType objects

public List<Object> getIssueTypesForProject (String token, String projectId)

Returns an array of all the (non-sub task) issue types for the specified project id.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
projectId Id of the project
Returns
  • an array of RemoteIssueType objects

public List<Object> getIssuesFromFilterWithLimit (String token, String filterId, Integer offset, Integer maxNumResults)

Returns issues that match the saved filter specified by the filterId. This method will return no more than the maxNumResults.

It will start the result set at the provided off set.

This method also respects the jira.search.views.max.limit and jira.search.views.max.unlimited.group JIRA properties which will override the max number of results returned.

If the jira.search.views.max.limit property is set and you are not in a group specified by jira.search.views.max.unlimited.group then the number of results returned will be constrained by the value of jira.search.views.max.limit if it is less than the specified maxNumResults.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
filterId Identifies the saved filter to use for the search.
offset The place in the result set to use as the first result returned
maxNumResults The maximum number of results that this method will return.
Returns
  • issues matching the saved filter

public List<Object> getIssuesFromJqlSearch (String token, String jqlSearch, Integer maxNumResults)

Execute a specified JQL query and return the resulting issues. This method also respects the jira.search.views.max.limit and jira.search.views.max.unlimited.group JIRA properties which will override the max number of results returned.

If the jira.search.views.max.limit property is set and you are not in a group specified by jira.search.views.max.unlimited.group then the number of results returned will be constrained by the value of jira.search.views.max.limit if it is less than the specified maxNumResults.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
jqlSearch JQL query string to execute
maxNumResults The maximum number of results that this method will return
Returns
  • issues matching the JQL query

public List<Object> getIssuesFromTextSearchWithLimit (String token, String searchTerms, Integer offset, Integer maxNumResults)

Returns issues containing searchTerms. Note: this is a fuzzy search, returned in order of 'relevance', so the results are only generally useful for human consumption.

This method will return no more than the maxNumResults.

It will start the result set at the provided off set.

This method also respects the jira.search.views.max.limit and jira.search.views.max.unlimited.group JIRA properties which will override the max number of results returned.

If the jira.search.views.max.limit property is set and you are not in a group specified by jira.search.views.max.unlimited.group then the number of results returned will be constrained by the value of jira.search.views.max.limit if it is less than the specified maxNumResults.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
searchTerms Search terms
offset The place in the result set to use as the first result returned
maxNumResults The maximum number of results that this method will return.
Returns
  • issues matching the search terms

public List<Object> getIssuesFromTextSearchWithProject (String token, List<String> projectKeys, String searchTerms, Integer maxNumResults)

Returns issues containing searchTerms that are within the specified projects. Note: this is a fuzzy search, returned in order of 'relevance', so the results are only generally useful for human consumption.

This method will return no more than the maxNumResults.

This method also respects the jira.search.views.max.limit and jira.search.views.max.unlimited.group JIRA properties which will override the max number of results returned.

If the jira.search.views.max.limit property is set and you are not in a group specified by jira.search.views.max.unlimited.group then the number of results returned will be constrained by the value of jira.search.views.max.limit if it is less than the specified maxNumResults.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
projectKeys The project keys to use
searchTerms Earch terms
maxNumResults The maximum number of results that this method will return.
Returns
  • issues matching the search terms

public List<Object> getNotificationSchemes (String token)

Returns notification schemes.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
Returns
  • the notification schemes.

public String getPassword ()

public List<Object> getPermissionSchemes (String token)

Returns the permission schemes.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
Returns
  • the permission schemes.

public List<Object> getPriorities (String token)

Returns an array of all the issue statuses in JIRA.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
Returns
  • an array of RemoteStatus objects

public RemoteAvatar getProjectAvatar (String token, String projectKey)

Retrieves the current avatar for the given project. Project browse permission is required.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
projectKey The key for the project.
Returns
  • the current avatar for the project.

public List<Object> getProjectAvatars (String token, String projectKey, Boolean includeSystemAvatars)

Retrieves avatars for the given project. If the includeSystemAvatars parameter is true, this will include both system (built-in) avatars as well as custom (user-supplied) avatars for that project, otherwise it will include only the custom avatars. Project browse permission is required.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
projectKey The key for the project.
includeSystemAvatars If false, only custom avatars will be included in the returned array.
Returns
  • the avatars for the project, possibly empty.

public RemoteProject getProjectById (String token, Long projectId)

Returns the Project with the matching id (if the user has permission to browse it).

Parameters
token Optionally provide a token to use, if not provided username and password will be used
projectId The id of the requested project
Returns
  • the RemoteProject object specified by the key, if it exists and the user has the BROWSE permission for it

public RemoteProject getProjectByKey (String token, String projectKey)

Returns the Project with the matching key (if the user has permission to browse it).

Parameters
token Optionally provide a token to use, if not provided username and password will be used
projectKey The key of the requested projec
Returns
  • the RemoteProject object specified by the key, if it exists and the user has the BROWSE permission for it

public RemoteProjectRole getProjectRole (String token, Long projectRoleId)

Returns the project role by projectRoleId.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
projectRoleId The projectRoleId of the project role
Returns
  • the project role by projectRoleId.

public RemoteProjectRoleActors getProjectRoleActors (String token, Long projectRoleId, String projectKey)

Returns the project role actors for the given project

Parameters
token Optionally provide a token to use, if not provided username and password will be used
projectRoleId The project role id to use
projectKey The project key to use
Returns
  • the project role actors for the given project

public List<Object> getProjectRoles (String token)

Returns the project roles.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
Returns
  • the project roles.

public RemoteProject getProjectWithSchemesById (String token, Long projectId)

Returns the Project with the matching id (if the user has permission to browse it) with notification, issue security and permission schemes attached.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
projectId The id of the requested project
Returns
  • the RemoteProject object specified by the key, if it exists and the user has the BROWSE permission for it

public List<Object> getProjectsNoSchemes (String token)

Returns an array of all the Projects defined in JIRA.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
Returns
  • an array of RemoteProject objects.

public Calendar getResolutionDateById (String token, Long issueId)

Given an issue id, this method returns the resolution date for this issue. If the issue hasn't been resolved yet, this method will return null. If the no issue with the given id exists a RemoteException will be thrown.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
issueId The id of the issue
Returns
  • The resolution date of the issue. May be null

public Calendar getResolutionDateByKey (String token, String issueKey)

Given an issue key, this method returns the resolution date for this issue. If the issue hasn't been resolved yet, this method will return null.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
issueKey The key of the issue
Returns
  • The resolution date of the issue. May be null

public List<Object> getResolutions (String token)

Returns an array of all the issue resolutions in JIRA.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
Returns
  • an array of RemoteResolution objects

public RemoteSecurityLevel getSecurityLevel (String token, String issueKey)

Returns the current security level for given issue

Parameters
token Optionally provide a token to use, if not provided username and password will be used
issueKey The issue key
Returns
  • issue security level

public List<Object> getSecurityLevels (String token, String projectKey)

Returns an array of all security levels for a given project.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
projectKey The key for the project
Returns
  • array of RemoteSecurityLevels for the project

public List<Object> getSecuritySchemes (String token)

Returns the security schemes.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
Returns
  • the security schemes.

public RemoteServerInfo getServerInfo (String token)

Returns information about the server JIRA is running on including build number and base URL.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
Returns
  • information about the server JIRA is running on including build number and base URL.

public List<Object> getStatuses (String token)

Returns an array of all the issue statuses in JIRA.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
Returns
  • an array of RemoteStatus objects

public List<Object> getSubTaskIssueTypes (String token)

Returns an array of all the sub task issue types in JIRA.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
Returns
  • an array of RemoteIssueType objects

public List<Object> getSubTaskIssueTypesForProject (String token, String projectId)

Returns an array of all the sub task issue types for the specified project id.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
projectId Id of the project
Returns
  • an array of RemoteIssueType objects

public RemoteUser getUser (String token, String username)

Returns information about a user defined to JIRA.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
username The user name to look up
Returns
  • a RemoteUser or null if it cant be found

public String getUsername ()

public List<Object> getVersions (String token, String projectKey)

Returns an array of all the versions for the specified project key.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
projectKey The key of the requested project
Returns
  • an array of RemoteVersion objects

public List<Object> getWorklogs (String token, String issueKey)

Returns all worklogs for the given issue.

Parameters
token Optionally provide a token to use, if not provided username and password will be used the SOAP auth token.
issueKey The key of the issue.
Returns
  • all the worklogs of the issue.

public boolean hasPermissionToCreateWorklog (String token, String issueKey)

Determines if the user has the permission to add worklogs to the specified issue, that timetracking is enabled in JIRA and that the specified issue is in an editable workflow state.

Parameters
token Optionally provide a token to use, if not provided username and password will be used the SOAP auth token.
issueKey The key of the issue.
Returns
  • true if the user has permission to create a worklog on the specified issue, false otherwise

public boolean hasPermissionToDeleteWorklog (String token, String worklogId)

Determine whether the current user has the permission to delete the supplied worklog, that timetracking is enabled in JIRA and that the associated issue is in an editable workflow state. This method will return true if the user is a member of the worklog's group/role level (if specified) AND The user has the WORKLOG_DELETE_ALL permission; OR The user is the worklog author and has the WORKLOG_DELETE_OWN permission and false otherwise.

Parameters
token Optionally provide a token to use, if not provided username and password will be used the SOAP auth token.
worklogId The id of the worklog wishes to delete.
Returns
  • true if the user has permission to delete the supplied worklog, false otherwise

public boolean hasPermissionToEditComment (String token, Long commentId)

Returns whether the current user has permissions to edit the comment denoted by the given id.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
commentId The comment id to use
Returns
  • whether the current user has permissions to edit the comment denoted by the given id.

public boolean hasPermissionToUpdateWorklog (String token, String worklogId)

Determine whether the current user has the permission to update the supplied worklog, that timetracking is enabled in JIRA and that the associated issue is in an editable workflow state. This method will return true if the user is a member of the worklog's group/role level (if specified) AND The user has the WORKLOG_EDIT_ALL permission; OR The user is the worklog author and has the WORKLOG_EDIT_OWN permission and false otherwise.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
worklogId The ide of the worklog wishes to update.
Returns
  • true if the user has permission to update the supplied worklog, false otherwise

public boolean isProjectRoleNameUnique (String token, String name)

Checks if the given project role name is unique.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
name The project role name to check for uniqueness
Returns
  • true if the given project role name is unique, false otherwise.

public String login (String username, String password)

Log in using the given credentials, it returns the authentication token.

Parameters
username The username to use
password The password to use
Returns
  • the authentication token

public boolean logout (String token)

Cleans up an authentication token that was previously created with a call to login

Parameters
token The token to invalidate
Returns
  • true if the logout succeeded

public RemoteIssue progressWorkflowAction (String token, String issueKey, String actionIdString, Map<String, List<String>> fields)

This will progress an issue through a workflow.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
issueKey The issue to update.
actionIdString The workflow action to progress to
fields The fields to be updated, the key of the map is the field id and the value is a list of values for that field.
Returns
  • the updated RemoteIssue

public void refreshCustomFields (String token)

Refreshs custom fields for the current user.

Parameters
token Optionally provide a token to use, if not provided username and password will be used

public void releaseVersion (String token, String projectKey, String versionName)

Releases the version denoted by the given name

Parameters
token Optionally provide a token to use, if not provided username and password will be used
projectKey The project key to use
versionName The version name to release

public void removeActorsFromProjectRole (String token, List<String> actors, Long projectRoleId, String projectKey, String actorType)

Removes the given actors from the project role

Parameters
token Optionally provide a token to use, if not provided username and password will be used
actors The actors to remove
projectRoleId The id of the project role to use
projectKey The key of project to use
actorType The actor type to use

public void removeAllRoleActorsByNameAndType (String token, String name, String type)

Removes all role actors using the given name and type.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
name The name to delete
type The type to delete

public void removeAllRoleActorsByProject (String token, String projectKey)

Removes all role actors for the given project key.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
projectKey The project key for which to remove all role actors

public void removeDefaultActorsFromProjectRole (String token, List<String> actors, Long remoteProjectRoleId, String type)

Removes the default actors from the project role denoted by this id.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
actors The actors to remove
remoteProjectRoleId The id of the project role
type The type

public void removeUserFromGroup (String token, String groupName, String userName)

Removes a user from the group name.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
groupName The group name for which to remove the user
userName The username to remove

public void setAddress (String address)

Parameters
address

public void setClient (JiraClient<?> client)

Parameters
client

public void setNewProjectAvatar (String token, String projectKey, String contentType, String base64ImageData)

Creates a new custom avatar for the given project and sets it to be current for the project. The image data must be provided as base64 encoded data and should be 48 pixels square. If the image is larger, the top left 48 pixels are taken, if it is smaller it is upscaled to 48 pixels. The small version of the avatar image (16 pixels) is generated automatically. Project administration permission is required.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
projectKey The key for the project.
contentType The MIME type of the image provided, e.g. image/gif, image/jpeg, image/png.
base64ImageData A base 64 encoded image, 48 pixels square.

public void setPassword (String password)

Parameters
password

public void setProjectAvatar (String token, String projectKey, Long avatarId)

Sets the current avatar for the given project to that with the given id. Project administration permission is required.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
projectKey The key for the project.
avatarId The id of an existing avatar to use for the project or null for the default avatar.

public void setUsername (String username)

Parameters
username

public RemoteGroup updateGroup (String token, String groupName, List<String> usernames)

Updates the given group name with the provided users.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
groupName The group name to update
usernames The updated usernames
Returns
  • the updated group

public RemoteIssue updateIssue (String token, String issueKey, Map<String, List<String>> fields)

This will update an issue with new values. NOTE : You cannot update the 'status' field of the issue via this method.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
issueKey The issue to update.
fields The fields to be updated, the key of the map is the field id and the value is a list of values for that field.
Returns
  • the updated RemoteIssue

public RemoteProject updateProject (String token, String key, String description, String url, String lead, String permissionSchemeName, String notificationSchemeName, String securityShemeName)

Updates the project denoted by the given key.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
key The key of the project to update
description The new description
url The new url
lead The new lead
permissionSchemeName The new permission scheme name
notificationSchemeName The new notification scheme name
securityShemeName The new security scheme name
Returns
  • the updated project

public void updateProjectRole (String token, Long projectRoleId, String projectRoleName, String projectRoleDescription)

Updates the project role with the given id.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
projectRoleId The id of the project role to update
projectRoleName The new project role name
projectRoleDescription The new project role description

public void updateWorklogWithNewRemainingEstimate (String token, String issueKey, String worklogId, String newRemainingEstimate, String comment, String groupLevel, String roleLevelId)

Modifies the worklog with the id of the given worklog, updating its fields to match the given worklog and sets the remaining estimate field on the relevant issue to the given value. The time spent field of the issue is changed by subtracting the previous value of the worklog's time spent amount and adding the new value in the given worklog.

Parameters
token Optionally provide a token to use, if not provided username and password will be used
issueKey The issue key to use
worklogId The worklog id to use
newRemainingEstimate The new value for the issue's remaining estimate as a duration string, eg 1d 2h.
comment The new comment
groupLevel The new group level
roleLevelId The new role level id