Skip to content

Commit 42e439a

Browse files
authored
Look up Support group of CI (#880)
* Create readme.md * Create LookUpSupportGroupFromCI.js
1 parent b650447 commit 42e439a

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
(function execute(inputs, outputs) {
2+
3+
// Be sure to update inputs variable for Configuration Item
4+
var supportGroup = inputs.configuration_item.support_group;
5+
var answer = '';
6+
7+
if (supportGroup == '') {
8+
answer = inputs.default_support_group; //Return the group specified in the "Default support group" input
9+
} else {
10+
answer = supportGroup; //Return the 'Support group' specified on the CI input
11+
}
12+
13+
outputs.support_group = answer;
14+
15+
})(inputs, outputs);
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## Overview
2+
To be used within an action to retrieve the **Support group** of a specified CI. If specified CI does not have a **Support group** a default value can be provided to return
3+
4+
## Inputs
5+
Pass in the Configuration Item record and specify a **Support group** to return if the provided CI does not have a **Support group** populated
6+
7+
## Script Step
8+
Create a script step with the code provided to look up the CI's **Support group** and return the appropriate value
9+
10+
## Outputs
11+
Returns a group

0 commit comments

Comments
 (0)