Our new Appfire Documentation Space is now live!

Take a look here! If you have any questions please email support@appfire.com

Set assignee of the issue based on day of the month.

This article provides the code snippet to assign the issue to a user, based on the day of the month, using Set field value (JMWE app) post-function.

Instructions

  1. Navigate to the intended workflow to make the necessary changes in the edit mode.

  2. Select the required transition.

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

  4. Add the “Set field value (JMWE app)” post-function.

  5. Select “Field” as “Assignee” and “Value type” as “Groovy Expression”.

  6. Add the below Groovy script in “Value”:

    int day = now.date if(day > 1 && day <= 10) return "john" else if(day > 10 && day <= 20) return "james" else return "alex"

Replace john, james, alex with the usernames of desired users.

References