Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

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

JMWE nunjuck question

Patrick van der Rijst October 31, 2023

I'm on server currently combining Scriptrunner's issueFunction within a JMWE Post Function to first link and then transition an issue. Now, I'm trying to find a way to do this with Nunjuck.

The first part I first tried to replace with Automation but the second part, is where JMWE is currently trying to do a named transition which occurs more than once so the status the linked issue goes to, may differ and I want to avoid different if/else cases in my Automation and first try to keep using JMWE.

On Server:

Create link between issue in Post Function and matching JQL of type XYZ 

JQL issueFunction in epicsOf("issueFunction in linkedIssuesOf('issuekey = $⁣{issue.id}', 'is related to')")

Second post function:

Transition issue issueFunction in epicsOf("issueFunction in linkedIssuesOf('issuekey = $⁣{issue.id}', 'is related to')") calling a transition name.

 

The JQL expression part accepts Nunjuck, not Jira expression so I'm either looking for the correct Nunjuck or how to do this in a build your own custom Post Function.

 

2 answers

1 accepted

0 votes
Answer accepted
Patrick van der Rijst November 1, 2023

This was my fix:

{% set alleGekoppeldAan = issue | linkedIssues("is gekoppeld aan")  %}
{% set epicKeys = [] %}
{% for gekoppeldIssue in alleGekoppeldAan %}
{% if gekoppeldIssue.fields.parent %}
{% set unused = epicKeys.push(gekoppeldIssue.fields.parent.key) %}
{% endif %}
{% endfor %}
{% if epicKeys.length > 0 %}
key in ({{epicKeys | join(",")}})
{% endif %}
0 votes
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 1, 2023

HI @Patrick van der Rijst 

Welcome to the community.

I have been trying to tackle related issues with JMWE and nunjucks as well.

Mot of the time I did reach out to their support, and they were able to help me. Not in all cases as those functionalities are not available.

You can find their portal here

Patrick van der Rijst November 1, 2023

I was able to resolve this myself, see my answer!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Upcoming Jira Events