commentsToContext

Takes the comments of a given entry ID and stores them in the incident context, under a provided context key. For accessing the last executed task's comments, provide ${lastCompletedTaskEntries.[0]} as the value for the entryId input parameter.

javascript · Common Scripts

Details

IDcommentsToContext
Languagejavascript
From Version5.0.0
TagsUtility

README

Use this script to take the comments of a given entry ID and stores them in the incident context, under a provided context key.
In order to access the last executed task’s comments, provide ${lastCompletedTaskEntries.[0]} as the value for the entryId input parameter.

Script Data


Name Description
Script Type javascript
Tags Utility

Inputs


Argument Name Description
entryId The entry ID to get the comments from.
contextKey The context key to store comments into.
listSeperator If value is a list - provide a list seperator.

Outputs


There are no outputs for this script.

commonfields:
  id: commentsToContext
  version: -1
name: commentsToContext
script: ''
type: javascript
tags:
- Utility
comment: "Takes the comments of a given entry ID and stores them in the incident context,\
  \ under a provided context key. \nFor accessing the last executed task's comments,\
  \ provide ${lastCompletedTaskEntries.[0]} as the value for the entryId input parameter."
enabled: true
args:
- name: entryId
  required: true
  default: true
  description: Entry ID to get the comments from
- name: contextKey
  required: true
  description: Context key to store comments into
- name: listSeperator
  description: If value is list - provide list seperator
scripttarget: 0
fromversion: 5.0.0