Hi Team,
Can we map main task "Estimated completion date" to the last of the subtasks "estimated completion date's?
For example :
Hi Lakshmi,
To achieve this with JMWE, you will need to use Set field value (JMWE app) post-function with the following code:
issue.get("subtasks")?.max{it -> it.customfield_10402}?.customfield_10402
You will need to replace customfield_10402 with "Estimated completion date" ID, I hope it helps and let me know how it goes.
Thank you for your quick reply @Sayed Bares _ServiceRocket_ .
The main task is not reading the value. I have added this on create transition on subtask workflow, I have added the field on Main task view screen, but the values is not updating on the main ticket. In the post function, its showing the correct value.
This is main ticket :
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you are setting the Parent's Estimated Completion Date from the subtasks workflow then you will need to use Set field value of related issues (JMWE app) post-function with the following code:
issue.parentObject?.get("subtasks")?.max{it -> it.customfield_10402}?.customfield_10402
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Sayed Bares _ServiceRocket_ ,
Thank you for your quick assistance on this. I have added this post function on main issue type and Create transition, but the values of the main task is not changing with the furthest date. Am I doing any mistake here ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you are adding it in the main issue workflow then you need to use my first script:
issue.get("subtasks")?.max{it -> it.customfield_10402}?.customfield_10402
However, if you are using in the subtask workflow then use my second script:
issue.parentObject?.get("subtasks")?.max{it -> it.customfield_10402}?.customfield_10402
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Sayed Bares _ServiceRocket_ Is it on create transition ? its not working and not updating the main ticket with the value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Lakshmi CH create transition of subtasks or main task? do you get any error when testing the code? can you share a screenshot from your setup?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Sayed Bares _ServiceRocket_ , Appreciate for your quick reply. I have added this code on main ticket create transition
issue.get("subtasks")?.max{it -> it.customfield_10402}?.customfield_10402
Its showing the correct value when I testing in the workflow post function
But the right value (which is subtasks furthest away "Estimated Completion Date") is not updating on Main ticket
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are most welcome :)
Isn't that the expected behaviour? you wanted to set the main task with the furthest subtask "Estimated completion date"?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Sayed Bares _ServiceRocket_ , The right value (which is subtasks furthest away "Estimated Completion Date") is not updating on Main ticket.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.