Routines (PS)

Looking for the documentation on the newest versions of Power Scripts for Jira 8 for Server/Data Center? Click here !

rStarting with Power Scripts for Jira 2.5.5, there are additional routines implemented in the Power Scripts for Jira, concerning the display on SIL Runner. We have also overhauled the UI dramatically, and now you can put messages in your long-running scripts so you can watch the progress on the runner.


  • Live Fields Routines
    • lfRestrictSelectOptions — Restricts certain options from the list of options for the field.
    • lfEnableTab — Enables the given tab.
    • lfShowFieldMessage — Displays a message for the given field.
    • lfRedirect — Redirects to the specified URL.
    • lfAllowSelectOptions — Restricts a field's selectable values to the list of options given as a parameter of the routine.
    • lfDisableTab — Disables the given tab of a provided name.
    • lfRefreshScreen — Performs a page reload.
    • lfWatch — Attaches listeners for the events that you give as parameters in the function.
    • lfEnable — Enables the given field.
    • lfInstantHook — Executes the given SIL script passing the screen values for the specified dependent fields (relatedFields) as parameters to the script.
    • lfHideFieldMessage — Hides a message for the given field.
    • lfShowTab — Shows the given tab.
    • lfGlobalMessage — Displays a global message.
    • lfDialogMessage — Displays a global message in a dialog box.
    • lfDisable — Disables the given field.
    • lfHideAllExcept — Hides all given fields, panels, and tabs except the ones given as parameters.
      • lfHide — Hides the given field.
    • lfHideTab — Hides the specified tab.
    • lfExecuteJS — Gives you the possibility to run your own javascript code.
    • lfSet — Sets the field with the given values.
    • lfShow — Shows the given field.
    • lfShowAll — Shows the given fields, panels and tabs.
  • Jira Software routines — This section contains a collection of routines for handling boards, sprints, issues, and ranking.
    • getBoardsFromSprint — Returns a list of board names for a sprint.
    • sprintName — Gets the name of the sprint.
    • deleteSprint — Deletes a sprint.
    • issueInBacklog — Checks whether the issue with the provided issue key is in the board backlog.
    • sprintCompleteDate — Gets the end date of the sprint.
    • getBoardInfo — Gets information about the board such as the id, name, or the board admins username.
    • addIssueToSprint — Adds an issue to a sprint
    • deleteBoard — Delete the specified board.
    • getBoardName — Gets the name of an agile board
    • notStartedSprints — Gets the future (not started) sprints from the board with the provided name or id.
    • sprintStartDate — Gets the start date of the sprint.
    • issueInStartedSprint — Checks whether the issue with the provided issue key is in the started sprint.
    • getAllBoardNames — Get a list of all agile boards visible to the user.
    • filterForBoard — Gets the filter associated with a board.
    • sprintInfo — Gets details about the sprint – sprint name, startDate, endDate, and completeDate.
    • cpCfValueToLinkedIssue — Enables to copy a custom field value to linked issues or by linking type. We also support custom Fields from the Insight plugin.
    • updateBoard — Update the provided board.
    • startedSprints — Gets the started sprints from the board with the provided name or id.
    • boardForFilter — Gets the board associated with a filter
    • removeIssueFromSprint — Removes an issue from a sprint.
    • getAllOpenSprints — Returns an array of JSprint type structs for every open sprint.
    • createSprint — Creates a new sprint for the provided rapid view.
    • issueInSprint — Checks whether the issue with the provided issue key is in the sprint.
    • getAllBoards — Returns an array of JBoard type structs for every agile board.
    • closedSprints — Gets the closed sprints from the board with the provided name or id.
    • boardsForProject — Gets the boards associated to a project
    • issuesInBoard — Returns all the issues which belong to the specified board. Optionally, you can filter them by visibility.
    • isEpic — Checks whether the issue with the provided issue key is an epic.
    • rankLast — Moves the issue to the bottom of the list.
    • rankBefore — Moves an issue before another issue.
    • getFilterId — Gets the filter id for a given board.
    • copyBoard — Create a copy of the provided board.
    • updateSprint — Updates a given sprint.
    • projectsForBoard — Gets the projects associated with a board.
    • rankFirst — Moves an issue to the top of the list.
    • rankAfter — Moves an issue after another, referenced issue.
    • sprintEndDate — Gets the end date of the sprint.
    • issueInEpic — Checks whether the issue with the provided issue key is in the epic.
    • createBoardFromExistingProjects — Create a board based on existing projects.
  • Jira Service Desk Routines — This section contains routines that enable users to handle comments and getting the URL for a specific ticket opened in Jira Service Desk.
    • getJSDUrl — This routine returns the url to a specific customer portal for an issue.
    • createCustomer — Creates a Service Desk customer. The newly created customer is not added to any JSD project, however he/she can raise request against unrestricted JSD projects.
    • addCustomerToOrganization — Adds an existing customer or a list of customers to a specified organization.
    • addOrganization — Adds an existing organization or a list of organizations to a specified Service Desk project.
    • getRequestsTypes — Returns an array of JRequestType containing all the Request Type data for a Portal.
    • organizationExist — Verifies whether a given organization is a registered JSD organization.
    • getJSDCommentPrivacy — Returns the privacy of comment entered on a transition screen. If the comment is internal, it will return "internal" and "external" otherwise.
    • removeCustomerFromOrganization — Removes a customer or a list of customers from a specified organization.
    • removeOrganization — Removes an organization or a list of organizations from a specified project.
    • getSlaInformation — Gets SLA information for the specified issue.
    • getUsersFromOrganizations — Gets users from a specified organization or list of organizations.
    • getRequestChannel — Gets the request channel type for a specified issue key.
    • getOrganizationNameById — Gets the Jira Service Desk organization by the Id.
    • removeCustomer — Removes a customer or a list of customers from a specified project.
    • getAllOrganizationIds — Returns the Ids of all Service Desk organizations.
    • createOrganization — Creates a new customer organization.
    • addJSDComment — Posts a comment on the specified issue on behalf of the specified user. Returns a number representing the id of the comment.
    • getPortalForProject — Retrieves a portal ID by searching for the projectKey. The routine will return a null if the portal is not found.
    • getAllServiceDeskProjects — Returns a list of all projects that are Jira Service Desk type projects.
    • isPublicJSDComment — This routine returns the type of comment, if the comment is public, the routine will return "true" otherwise it will return "false".
    • inviteCustomer — Sends an invitation to a customer or a list of customers for a specified Service Desk project.
    • deleteOrganization — Removes a customer organization.
    • addCustomer — Adds an existing customer or a list of customers to a specified Service Desk project.
  • Mail Handler Routines
    • saveAttachmentFromEmail — Saves the attachment file from the incoming email to a specific file path.
    • attachAllFilesFromEmail — Attaches all attachments from the incoming email to a specific issue.
    • getIncomingEmail — Retrieves a structure containing information about the incoming email such as sender, recipients, subject, or body.
    • attachFileFromEmail — Attaches a single file from the incoming email to a specified issue.
  • Listener Routines
  • Gadget Parameter Routines
  • RunnerLog