I'm trying to use a JQL filter to find a list of issues, and then include that information in the text of a call to an incoming webhook in Teams. I'm struggling with passing around the information/doing things correctly. I currently am doing this in Jira's automations, but would prefer to use JMWE going forward.
I have the query that finds the issue, and I have an idea of how I will be using callRest, but I'm not sure how I would take the results of the search and loop through them in the "text" section in the call to the webhook... any pointers would be appreciated!
{{ "project = \"Tech Support\" AND statusCategory != Done AND \"EquipmentOptions[Checkboxes]\" in (Laptop) AND \"Equipment Shipped?[Checkboxes]\" is EMPTY" | searchIssues(100, fields="url,summary") | }}
{{ "insertWeebookURLHere" | callRest(
verb="post",
body={
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"themeColor": "0076D7",
"summary": "A New Laptop has been Requested!",
"sections": [{
"activityTitle": "There are currently " + issueLookupSizeHere + " in the queue that require a laptop to be shipped out:",
"text": "",
"markdown": true
}]
}
) }}