Versions Compared

Key

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

This article helps to understand how the post function executes the action based on the checks performed by date compare precondition.functions execute the action when the time part is included in the date compare precondition. In particular, when the dates within the date/date-time fields are of the same date then the date compare precondition will execute the action based on the time within the date/date-time fields.

Info

Use cases:

  • To execute post functions based on the date parts within the date fields using date compare precondition

  • To execute post functions based on the date and time within the date-time fields using date compare precondition

  • To update any field based on the date compare precondition

Instructions

Please note, the steps below are added on the Resolve transition, to compare the Due date and Resolved date, and to execute the action accordingly.

  1. Edit the workflow that is associated with your project.

  2. Select the Resolve transition.

  3. Select the Post Functions tab and click click the Add post function.

  4. Select the Precondition: Date Compare(JSU) and clickAdd

  5. Select the parameters to add the condition as Resolved <= Due Date and click Add.

    Image RemovedImage Added

  6. This precondition will check checks only the date part and execute executes the action. If you want the precondition to check the time along with the date and perform the action, then tick select the Include time part checkbox option.

  7. Select the Update Any Issue Field (JSU) post function and click Add

  8. Set precondition must be Precondition should be set to True and select the field to be updated with a preferred value and click Add

    Image RemovedImage Added


    In exceptional cases like for the Sprint field, the Field Value should be the id of sprint instead of sprint name.

  9. Now, select the parameters to add the condition as Resolved > Due Date and click Add

    Image RemovedImage Added

  10. This precondition will also check checks only the date part and execute executes the action. If you want the precondition to check the time along with the date and perform the action then tick select the Include time part checkbox option.

  11. Select the Update Any Issue Field (JSU) post function and click Add to update the field when the above precondition is true.

  12. Set The precondition must should be marked as True and select the field to be updated with a preferred value and click Add

    Image RemovedImage Added

  13. Once all the preconditions and post functions are added, re-arrange the order of the configuration as shown below:

    Image RemovedImage Added

  14. Publish the workflow, create .

  15. In order to test this scenario:

    1. Create an issue by providing a value for the Due date field

    , and transition
    1. .

    2. Transition the issue to check if the fields are updated accordingly.

Info

For better results, make sure that both the preconditions check either Only only the date part or Include the time part to execute the action correctly.

...