Working with JSD Customer Portal requests in Live Fields

Note that the "Raise a request" dialog/popup/iframe screen (accessible from the project's page in Jira) is not supported by Live Fields.

Accessing the request type id

Starting with version 4.6 of Power Scripts™ for Jira, the requestTypeId argument is accessible inside the Live Fields scripts loaded in the JSD Customer Portal. This helps to easily filter your actions based on which request type you are operating with.

Syntax

argv["requestTypeId"]

Description

This can only be used in the Jira Service Management Customer Portal.

Returns the actual request type id on which the current Live Fields SIL™ script is executed, this applies to both the initial script and any hooked script.

Return type

An integer value (given as a string), corresponding to the actual customer portal request type id.

Example

This can be useful when you want to apply certain Live Fields actions only for a specific request type if.

For example, you want the description to always be set to "x" when creating a new request in the customer portal that has the request type 3.

You can achieve this by checking the requestTypeId argument:

init.sil
if(argv["requestTypeId"] == 1) { lfSet("description", "x"); }

Filtering request types in the Customer Portal landing page

Availability

This feature is available starting with the following app versions:

  1. Power Scripts™ for Jira 4.6.3/4.8.0.2

If you need to show only certain requests in the Customer Portal's landing page you can use either one of the following Live Fields routines: 

The call to any of these two should be made by setting the field parameter to 'requests' and the options parameter to a list of request ids.

init.sil
if(argv["screen"] == "portal-landing") { lfAllowSelectOptions("requests", {"1", "2"}); // only requests with ids 1 and 2 will be shown }