Skip to end of metadata
Go to start of metadata

Introduction

This section contains routines that enable users to interact with Jira environment.

Routines summary

  • addCommentPosts a comment on the specified issue on behalf of the specified user. Returns a number representing the id of the comment.
  • addDashboardToFavoritesAdds a dashboard to user's favorites.
  • addFilterToFavoritesAdds a filter to the user's favorites.
  • addGroupsToGroupAdd the provided groups to the specified groups if they are not already added.
  • addGroupToProjectRoleAdds a single group to a project role if the group is not already in that role.
  • addUserToGroupAdds a single user to a group if the user is not already in that group.
  • addUserToProjectRoleAdds a single user to a project role if the user is not already in that role.
  • addWorklogAdjustEstimateAdds worklog. The remaining time is reduced by the amount of work done, but never below 0.
  • addWorklogExistingEstimateAdds worklog and keeps remaining time the same.
  • addWorklogReduceEstimateByAdds worklog and the remaining time will be reduced by the value of reduceBY, but never below 0.
  • addWorklogSetEstimateToAdds worklog and sets remaining time to the value of setTo.
  • allLinkedIssuesReturns an array with the issue names linked with the specified issue, including the system links (subtask, issue in epic).
  • allProjectsReturns a string array with the keys of all the projects in Jira.
  • attachFileAdd an attachment to a selected issue.
  • attachFileFromURLAdds an attachment located on an URL path to a selected issue.
  • autotransitionExecutes a transition and moves to the specified step. It will execute the transition only if the transition is valid for the current status of the issue.
  • changeDashboardOwnerChanges the ownership of an existing dashboard.
  • changeFilterOwnerChanges the ownership of an existing filter.
  • changeSubtaskOrderChanges subtask position.
  • cloneIssueDuplicates the issue and returns the key of the duplicated issue. If specified, it also creates a link to the duplicated issue.
  • copyAttachmentCopies an attachment from one issue to another.
  • copyAttachmentByIdCopies the attachment for the provided id from one issue to another.
  • countIssuesReturns the number of issues that matched the search query.
  • createDashboardCreates a dashboard with name, owner and description
  • createFilterCreates a filter with name, description, search query, and owner.
  • createGroupCreate a single group to a project role if the group does not already exist.
  • createIssueCreates an issue based on the provided arguments.
  • createUserCreates a new user. 
  • createWebLinkCreates a web link on the issue.
  • currentUserReturns the key for the user that invoked the script containing currentUser.
  • currentUserKeyReturns the key for the user that invoked the script containing currentUserKey.
  • currentUsernameReturns the username for the user that invoked the script containing currentUsername.
  • deleteAttachmentDeletes the attachment for a given id or for a specified issue and file name.
  • deleteCommentDeletes a comment with the specified id, deletes the latest comment or deletes all comments from a given issue.
  • deleteIssueDeletes the selected issue.
  • deleteWebLinkByIdRemoves a web link.
  • editCommentEdits a comment with the specified id and text. Optional, you can edit the security level for comment. Returns the comment representation after the edit.
  • fieldHistoryReturns all the pairs date + value for the selected field from the selected issue's history.
  • getAllCommentIdsGets all the comment ids that are already entered on an issue.
  • getAttachmentPathGet the file path for the attachments with name <attachment name> attached to <issue key>.
  • getAvailableTransitionsRetrieves all available transitions for the current user from the given issue state.
  • getCommentReturns the comment entered in a transition screen, or an empty string if no comment has been entered or the transition doesn't have a screen.
  • getCommentByIdGets all the comment properties for a given id.
  • getCustomFieldNameByIdGets the name of the custom field by id.
  • getFieldChangesReturns a list of tuples containing user|field|oldVal|newVal for the selected field from the selected issue's history.
  • getFieldOptionsReturns a string array representing the list of options for a custom field.
  • getInputGets the value of a field in the transition screen. Should only be used in transitions that require a screen.
  • getIssueEntityPropertyJsonReturns the entity property in JSON string.
  • getIssueFieldNamesReturns a list with the names of all standard and custom fields of an issue.
  • getIssueFieldsReturns a map with all standard and custom fields of an issue. The map contains pairs of field name and field values.
  • getIssueLinksDetailReturns all the details about the links of an issue key.
  • getIssueURLReturns the url of the issue.
  • getJIRABaseUrlThis routine returns Jira base url where the SIL™ script is called.
  • getLastCommentGets all the comment properties for the last issue comment.
  • getPriorityIdByNameGets the priority id by the priority name.
  • getPriorityNameByIdGets the priority name by the priority id.
  • getProjectComponentLeadReturns the leader of the specified component from the specified project.
  • getProjectKeyByNameRetrieves the key for the project with the given name.
  • getProjectRoleIdByNameRetrieves the id for the project role with the given name.
  • getStatusIdByNameGets the status id by the status name.
  • getStatusNameByIdGets the status name by the status id.
  • getTeamLeadersReturns the team leaders on the specified project. All the component leads.
  • getTimeSpentGets the time spent (logged) on an issue by a certain user or group.
  • getTransitionNameByIdGets the transition name by the workflow name and transition id.
  • getUserGets the user by username or key.
  • getUserByEmailGets the user by email address.
  • getUserByFullNameGets the user by full name.
  • getUserDirectoryNameReturns the directory name the user belongs to.
  • getUserKeysFromEmailsFinds the corresponding user keys for a list of email addresses.
  • getUserPropertyRetrieves properties of users.
  • getWebLinkByIdRetrieves information about a web link.
  • getWebLinksForIssueGets the ids of all the web links on an issue.
  • getWorkflowStatusIdsRetrieves an unique list of statuses (ids) for a given workflow.
  • getWorkingDaysPerWeekGets the number of working days per week as configured in Jira.
  • getWorkingHoursPerDayGets the number of working hours per day as configured in Jira.
  • getWorkingIntervalReturns the number of working hours from a time interval.
  • getWorklogAuthorReturns the author of a worklog.
  • getWorklogCommentReturns the comment associated with the worklog.
  • getWorklogCreatedDateReturns the created date of a worklog.
  • getWorklogIdsReturns an array with the ids of the worklogs for the specified date and issue.
  • getWorklogIdsForUserReturns an array with the ids of the worklogs for the specified user and issue.
  • getWorklogLoggedHoursReturns the logged hours for a worklog.
  • getWorklogsForIssuesReturns an array with the worklogs for the specified list of issues, and if exists for given user also.
  • getWorklogStartDateReturns the start date of a worklog.
  • getWorklogUpdateAuthorReturns the author who last updated the worklog.
  • getWorklogUpdatedDateReturns the last date when the worklog was updated.
  • groupExistsVerifies if the selected group is a registered Jira group.
  • hasInputVerifies if a field had input in the transition screen. Should only be used in transitions that require a screen.
  • hasPermissionChecks if a user has the specified permission.
  • hasUserPropertyChecks if the user has the given property set.
  • i18nTextReturns the i18n text if the key can be resolved. Otherwise, the key itself will be returned.
  • isAnyUserAuthenticatedVerifies if there is a logged in user.
  • isCustomFieldInContextChecks if a custom field is in the context of a specified issue type for a project.
  • isIssueContextVerifies if the script is running in an issue context.
  • issueTypesForProjectRetrieves the issue types for the project with the given key.
  • isTeamLeaderVerifies if the specified user is a team leader on the project (if it is a component lead).
  • isUserInRoleReturns "true" if the user has a certain role on the specified project.
  • lastFieldHistoryReturns the last change details (user | date | field | oldValue | newValue) from the selected issue's history.
  • lastIssueChangesReturns the last changes details for all the fields touched by user (array of JFieldChange) from the selected issue's history.
  • linkedIssuesReturns an array with the Issue keys linked with the specified one.
  • linkIssueLinks two issues by a specified link type name. First issue will have the outward description of the link type, the second issue will have the inward description of the link type.
  • projectMembersReturns a list with all the user names of the users who have a role in the specified project.
  • projectPMReturns the username of the project manager (project lead) of the selected project, if exists.
  • projectsForPMReturns all the projects the selected user has the role of project manager (project lead) in.
  • projectsForUserReturns all the projects where this user has permission to assign or to be assigned issues.
  • projectsWithPermissionForUserRetrieves the project keys where the given user has the given permission.
  • raiseEventTriggers an event to be processed by listeners.
  • removeGroupRemoves a group from Jira.
  • removeGroupFromGroupsAdd the provided groups to the specified groups if they are not already added.
  • removeGroupFromProjectRoleRemoves a single group from a project role if the group is in that role.
  • removeUserFromGroupRemoves a single user from a group if the user is in that group.
  • removeUserFromProjectRoleRemoves a single user from a project role if the user is in that role.
  • removeWorklogAdjustEstimateRemoves the worklog and the Remaining will be increased by the time from the worklog.
  • removeWorklogExistingEstimateRemoves the worklog and keeps Remaining time the same.
  • removeWorklogIncreaseEstimateByRemoves the worklog and the Remaining time will be increased by the value of increaseBy.
  • removeWorklogSetEstimateToRemoves the worklog and sets Remaining time to the value of setTo.
  • renderWikiReturns the html code for the wiki text.
  • resetUserPasswordCreates a dashboard with a name, an owner and a description.
  • runAsAssumes a user when running a script.
  • selectIssuesReturns an array with the keys of the issues that matched the search query.
  • selectIssuesByFilterReturns an array with the keys of the issues obtained by running the given filter.
  • setUserPropertySets properties of users.
  • subtasksGet the list of sub tasks linked to the parent issue.
  • unlinkIssueRemoves the specified link between two issues.
  • updateWorklogAdjustEstimateUpdates the worklog and the Remaining time will be adjusted with the value of interval, but never below 0.
  • updateWorklogExistingEstimateUpdates the worklog and keeps the same Remaining time.
  • updateWorklogSetEstimateToUpdates the worklog and keeps the same Remaining time.
  • userEmailAddressReturns the email address of the selected user. The email address may be needed to supply it to various external systems.
  • userExistsVerifies if the selected user is registered Jira user.
  • userFullNameReturns the full name (firstname, lastname) of the user.
  • userGroupsReturns the groups the selected user belongs to.
  • userHasAccessToCommentVerifies if a comment is visible for an user.
  • userInGroupVerifies if the selected user is in the selected group(s).
  • userKeyToUsernameReturns the username for the provided user key.
  • userLanguageReturns the language for an user.
  • userLocaleReturns the locale for a user.
  • usernameToUserKeyReturns the user key for the provided username.
  • userRolesReturns the roles of the provided user in the project.
  • usersInGroupsReturns a list of users common to all the specified groups.
  • usersInRoleReturns the users that corespond to a certain role on the specified project.



  • No labels