Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


How do I get results from searchIssues and use the returned values in a callRest()?

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(
"@type": "MessageCard",
"@context": "",
"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
) }}

1 answer

1 accepted

0 votes
Answer accepted
David Fischer _Appfire_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 08, 2023

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!

Suggest an answer

Log in or Sign up to answer
Site Admin
AUG Leaders

Atlassian Community Events