You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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
}]
}
) }}
Hi @Drew
You just need to replace the first part with:
{%set issueLookupSizeHere = "project = \"Tech Support\" AND statusCategory != Done AND \"EquipmentOptions[Checkboxes]\" in (Laptop) AND \"Equipment Shipped?[Checkboxes]\" is EMPTY" | searchIssues(100, fields="summary") | length %}
Hey David,
Thanks for the reply, that did work for me! I'm new to using nunjucks and JWME so I'm still getting the hang of it. Ultimately I was able to accomplish everything I wanted to, and this helped me get there. Much appreciated!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.