Info |
---|
|
This routine is available starting with Power Scripts™ 4.0.13.This routine is available for Jira server and Data Center deployment options. Table plus |
---|
applyColStyleToCell | true |
---|
columnTypes | s,s,s,s |
---|
heading | 0 |
---|
multiple | false |
---|
columnAttributes | style="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold, |
---|
enableSorting | false |
---|
|
Syntax | sendIntegrationMessage(name, message |
|
...
or [SlackMessage]) | Package |
| Alias |
| Pkg Usage |
|
|
Description
Excerpt |
---|
|
Sends a message to integration such as Slack. |
Sends a message to integration such as Slack.
Parameters
Table plus |
---|
applyColStyleToCell | true |
---|
columnTypes | s,s,s,s |
---|
heading | 0 |
---|
multiple | false |
---|
enableSorting | false |
---|
|
Parameter name | Type | Required | Description |
---|
name |
|
...
...
Yes | The name of the integration. |
|
...
Make sure that you have an integration configuration added for the specified name |
|
...
...
...
...
StrideMessage
...
JStrideMessage
...
yes
...
message to be sent | SlackMessage |
|
...
...
Yes | Slack message to be sent |
|
Examples
Example 1 - Sending a plain text message to Stride
Code Block |
---|
return sendIntegrationMessage("Power Scripts for JIRA", "Send a plain text message to Stride"); |
Example 2 - Sending a message with a bullet list in Stride
Code Block |
---|
JStrideContent text;
text.type = "text";
text.text = "Bullet List example:";
JStrideContent paragraph;
paragraph.type = "paragraph";
paragraph.content = {text};
JStrideContent text1;
text1.type = "text";
text1.text = "List Item 1";
JStrideContent text2;
text2.type = "text";
text2.text = "List Item 2";
JStrideContent paragraph1;
paragraph1.type = "paragraph";
paragraph1.content = {text1};
JStrideContent paragraph2;
paragraph2.type = "paragraph";
paragraph2.content = {text2};
JStrideContent item1;
item1.type = "listItem";
item1.content = {paragraph1};
JStrideContent item2;
item2.type = "listItem";
item2.content = {paragraph2};
JStrideContent bulletList;
bulletList.type = "bulletList";
bulletList.content = {item1, item2};
JStrideMessage message;
message.version = 1;
message.type = "doc";
message.content = {paragraph, bulletList};
return sendIntegrationMessage("PS", message); |
The result will look like the following image:
Image Removed
...
Return Type
None
Example
Code Block |
---|
JSlackAttachment att1;
att1.pretext = "Optional text that appears above the attachment block";
att1.title = "This is an example of attachment ...";
att1.text = "*Bold* ~strike~ text";
att1.color = "#4286f4";
JSlackAttachment att2;
att2.title = "This is an example of attachment with code.";
att2.text = "`var'var i = 0; doSomethingWith(i);`'";
att2.color = "#f45641";
JSlackMessage message;
message.channel = "C94S1U658";
message.text = "Test slack message with attachment...";
message.attachments = {att1, att2};
return sendIntegrationMessage("SLACK", message); |
The result will look like the following image:
Image Removed
See also
...
See also
Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 25 |
---|
showSpace | false |
---|
cql | label = "user_routine" and space = currentSpace ( ) |
---|
labels | array_routines |
---|
|