[JMWE] Find bigger date from Epic's issues and copy it to an Epic field

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 19, 2021

Hi all!

Let me lay out the foundation for my question:

I have an epic. Below this epic, I have two different issue types: dev & specs. The dev issue types have an actual start date field and actual end date field (both date picker fields), which are automatically added to each issue, upon starting the progress or completing the work. I'm using JMWE on my cloud instance.

My question is the following: Upon Epic's resolution (moving from e.g. in progress to done) I want to search for all dev issues which belong to this epic and which must be resolved. Then, if they are all resolved, find their Actual End Date, take the most recent one (the bigger, the greatest, the one closest to today) and then copy it on the same field on my epic.

Any ideas?

Cheers!
Alex

1 answer

1 accepted

1 vote
Answer accepted
Suprija Sirikonda _Appfire_
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.
April 19, 2021

Hi @Alex Koxaras _Relational_ ,

Add a "Set field value (JMWE app)" post-function on the Done transition of the Epic. Select Current Issue under Target Issue(s), select the destination field and add the below value : 

{% set issues = issue | stories() | filter(["fields.issuetype.name","dev"]) %}
{% if issues | filter(["fields.status.name","Resolved"],true) | length == 0 %}
{{issues | filter(["fields.customfield_10083",null],true) | field("fields.customfield_10083") | sort | last}}
{% endif %}

Replace "dev" in line #1 with the desired issue type name(which belongs to Epic), replace "Resolved" in line #2 with the required status of the dev issues and replace "customfield_10083" with the id of "Actual End Date" custom field.

SMWEC-2240.png

 

We have opened a support ticket, https://innovalog.atlassian.net/servicedesk/customer/portal/10/SMWEC-2240 to better track your request. However, we couldn't add you as a reporter.  Please sign up using this link https://innovalog.atlassian.net/servicedesk/customer/portal/10/user/signup and share the user name/id. We'll then add you as the reporter and confirm. 

Thanks,

Suprija

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 20, 2021

Hi Suprija,

I truly appreciate your answer and what you have provided clearly worked! Can't thank you enough :)

I've created an account and you may find my username under my Full Name "Alex Koxaras".

Alex

Suggest an answer

Log in or Sign up to answer