Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

User exception in copy field from parent to sub-task using the JMWE condition

Lakshmi CH
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.
August 7, 2025

Hi Team,

We added the "Assignee Issue" JMWE post function, and it has condition 

  1. If the parent is ABC or XYZ, and Strategist is not set-->> assign the issue to the current user who transitioned the ticket ::: This is already implemented and working

    (issue.parentObject.issueType.name == "ABC" || issue.parentObject.issueType.name == "XYZ") && (!issue.parentObject.get("customfield_39060"))

    How can I do the exception to this  when a specific user (for example: John) moves the ticket, and maintain the current assignee of the ticket throughout the transition
    For example, if John moves the ticket, it shouldn't assign the ticket to John; instead, it should keep the same assignee. For all other users, the user who transitioned the ticket will take that current user and assign it to the ticket.

    I tried adding the below condition to the above one, but its not working.

    && (issue.parentObject.get("assignee") != "john@xxx.com"

    Can you please help me to correct it ?

1 answer

0 votes
Shawn Doyle - ReleaseTEAM
Community Champion
August 7, 2025

Hi @Lakshmi CH 

 

You'd want to add something like {{currentUser.accountId}} != john's account id

Variables in Nunjucks Templates - JMWE for Jira Cloud - Confluence

This would be the user actually doing the transition and not the assignee.

 

Lakshmi CH
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.
August 7, 2025

Hi @Shawn Doyle - ReleaseTEAM ,

Thank you for your quick resonse. I tried both methods, but it's still assigning to the exceptional user who transitioned the ticket


 

(issue.parentObject.issueType.name == "ABC" || issue.parentObject.issueType.name == "XYZ") && (!issue.parentObject.get("customfield_39060")) && (currentUser.name  != "john@xxx.com")

 

and 

(issue.parentObject.issueType.name == "ABC" || issue.parentObject.issueType.name == "XYZ") && (!issue.parentObject.get("customfield_39060")) && ( {{currentUser.accountId}} != "john@xxx.com")

Suggest an answer

Log in or Sign up to answer