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

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

Avatar

1 badge earned

Collect

Participate in fun challenges

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

Challenges
Coins

Gift kudos to your peers

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

Recognition
Ribbon

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!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,560,349
Community Members
 
Community Events
185
Community Groups

JMWE parent issue filter access

Paul Alexander
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.
Oct 26, 2022

From the JMWE documentation, when I apply any of these three filters to any post function's template and test it from within the post function, it returns nothing. I pass it a valid subtask whose parent that is a standard issue type has an epic link.

These three examples are pulled from here:

Custom Nunjucks filters - JMWE for JIRA Cloud - Confluence (atlassian.net)

I'm trying to understand how to work with these filters, but I guess I'm missing some syntax. If I can figure out how this works, I can apply this knowledge to get what I need. Please and thank you.

{{ issue | parentIssue }}
{{ issue  parentIssue("status") | field("fields.status.name") }}
{{ issue | parentIssue | field("fields['Epic Link']") }}

Your template ran successfully

Result value:

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.
Oct 26, 2022

Hi @Paul Alexander 

The first line will display [Object object] because the result is an object (the full parent issue). But if you try this:

{{issue|parentIssue|dump(2)}}

You will see the full details of the parent issue.

However, did you try it on a sub-task that belongs to a company-managed project? JMWE doesn't support team-managed projects. 

Paul Alexander
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.
Oct 27, 2022

Hi David. When I run this against a subtask in a company-managed project, it returns nothing. I'm pointing to a subtask whose parent issue has an epic link to an Epic. For testing, I'm just applying this template to a add-comment post function. I've tried this against the 'current issue' and 'parent issue of the current subtask' in the issues to operate on 'Target Issue' dropdown but same result.

{{ issue | parentIssue | field("fields['Epic Link']") }}

Your template ran successfully

Result value:

When I run this against the same subtask issue, the epic link is visible on the parent issue.

{{issue|parentIssue|dump(2)}}

The ID for my epic link field is customfield_11440 but I can't figure out how to pass this instead of its name "epic link" as shown above. At this point I'm just trying to get the epic link to display to understand how these filters work. I can't get any of the filter examples on the linked page above to work.

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.
Oct 27, 2022

Hi @Paul Alexander ,

 can you try this :

{{ issue | parentIssue("customfield_11440") | field("fields.customfield_11440") }}

 However, using the Epic Link field is not recommended, as Atlassian will be retiring this field soon. 

Use this instead:

{{ issue | parentIssue("key") | epic("key") | field("key") }}
Paul Alexander
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.
Oct 27, 2022

This pattern works, David, and I can apply this to other objects now to reach up to the parent and do things like increment a custom field. Thanks again. I couldn't figure out the syntax needed to allow the ID to work. Here they are side by side for comparison.

{{ issue | parentIssue("customfield_11440") | field("fields.customfield_11440") }}
{{ issue | parentIssue | field("fields['Epic Link']") }}

Interesting on losing the special 'epic link'. Here's an article from the mothership.

Deprecation of the Epic Link, Parent Link and other related fields in REST APIs and webhooks - Jira Development / Jira Cloud Announcements - The Atlassian Developer Community

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events