...
Navigate to the desired workflow transition and add the “Set field value “Set issue fields (JMWE app)” post-function.
Select the target issue, target field and add the below template in Value :
Code Block language java {% set startDate = issue.fields.customfield_10057 %} {% set nod = issue.fields.customfield_10055 %} {%set endDate = startDate %} {% for n in range(0, nod) %} {%set endDate = endDate | date('add' , 1 , 'days') | date %} {% set day = endDate | date('e') %} {% if day == 5 %} {%set endDate = endDate | date('add' , 2 , 'days') | date %} {% elif day == 6 %} {%set endDate = endDate | date('add' , 1 , 'days') | date %} {% endif %} {% endfor %} {{endDate}}
...
In the above template, we’re considering Friday (line #7) and Saturday (line #6#9) as non-working days. Modify them as per your use case (refer to this page)
...
References
...