Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Directive Values - This is a list of Custom Field values that have been set by the Script. e.g. using resultMap.set('labels', "label1,label2,label3,label4");

  2. Script Output - This is where the Print values are output, allowing for additional information to be displayed. e.g. using print(`Body: \n${message.getBody()}`);

  3. Script Evaluation Time Metrics - This is used to identify how long it took to evaluate the script against the selected Test Case.

Available Script Context

The another ticket with different subject β€œATH201125 –405034 – Visit Early Termination (A)”. It is showing in the auditing page but the subject was never processed & new created was not created , that is what I mentioned instead of creating new ticket , the existing ticket TDAS-55011 was commented. API

Notes

message.getBody()

Get body content of email. Not available for preprocessing task.

message.getSubject()

Gets the Subject content of email.

message.getAllHeaders()

Get all headers of a message.

message.getHeader(name)

Get value of a message header

Parameters

  • name the name of the header to get

issue

If the email being processed is commenting on an existing issue, then this context will contain the field values for the related issue. Allowing for this data to be used within the Script. Format used is as per the Get Issue response from the Jira REST API.

Note: This is only available within the Script Custom Field default and the Script Field Processor.

For more info about using Issue Data see: https://thepluginpeople.atlassian.net/wiki/spaces/JEMHC/pages/3861676043/Manipulate+Issue+data+in+Scripting+features#Showing-the-JSON-object-Values-and-structure

print(str)

Adds output that is recorded during execution and shown in the processing report.

Parameters

  • str (String) the string to be recorded

setOutcome(outcome, reason)

Set the processing outcome of the script

Parameters

  • outcome (String) the outcome type

  • reason (String) the reason for the outcome

Note: outcome must be written in all capitals. Valid outcomes are (IGNORE, FORWARD, DROP)

resultMap

Used to set issue field values. See Map - JavaScript | MDN for usage.

RegExp

Searches within string values for matching content. See RegExp - JavaScript | MDN for usage.

Script Examples

See the following page for some example use cases: Use Script Field Processor

...

This exception occurs when the script is too large. Scripts must be less than 6291456 bytes (6.29MB) in order to run.

...

SyntaxError

...