Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Navigate to the desired workflow transition and add the “Set field value Set issue fields (JMWE app)” post-function.

  2. Select the target issue, target field and add the below template in Value :

    Code Block
    languagejava
    {% 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

...