Skip to content
    June 4, 2024

    JIRA ACADEMY: Part 2

    Add Start & Due Dates to Stories and Epics, Update Epic status

    In my last automation article, I mentioned how I learned how to make Jira work for me, but in reality, Jira did not do any work for me—it just enforced following a certain rule. For this article, I wanted to ensure we put Jira to work and have it help by performing a task. One of the challenges my teams and I encountered was keeping our epics updated. The epic is in a “backlog” status, and the team is working on stories, but we never update the epic status. In another case, we completed all the stories for the epic, but the epic was never moved to “done.” In this article, I will cover how to get Jira to automatically move the epic along with the stories as the work progresses through the backlog. I will also explain how to attach 'start' and 'in progress' dates so that accurate velocity can be tracked.

    We will be setting up two different automations in this example:

    1. Add 'start date' when a story/epic moves to 'in progress'
    2. Add a 'due date' when the status changes to 'done'

     Both automation prompts follow the same steps but are performed in different fields.

    Example:

    1. Trigger
      1. “Add a trigger”
      2. Select “Issue transitioned” (you can type in the search field)
      3. From status “Backlog,” “Selected for Development” to status “In Progress”
    2. Conditions
      1. Select “IF: Add a condition”
      2. Under Recommended options, select “Issue fields condition”
      3. Field = “Issue Type”, Condition = “equals”, Value = “Story”
    3. Action
      1. Select “THEN: Add an action”
      2. Under recommended select “Edit issue”
      3. Select the “Start Date” field to edit and enter in the box
        1. With this action we are setting the “Start Date” field to be populated with the current date

    Jira screenshots 1

    The second part of the automation is to update the epic now that the story has been updated. We will set up a separate “branch” to perform the updates on the epic. The “branch” allows us to specify other conditions and set up additional actions to be performed based on the same trigger.

    1. Branch
      1. Select the “FOR EACH: Add a branch”
      2. “Branch rule / related issues” option
      3. Under “Type of related issues” select “Parent”
      4. Select “IF: Add a condition”
      5. Under Recommended options select “Issue fields condition”
      6. Field = “Status”, Condition = “is one of”, Value = “Backlog”, “Selected for Development”
      7. Select “THEN: Add an action”
      8. Under Recommended select “Transition issue”
      9. Set the Destination status to “In Progress”
      10. Select “THEN: Add an action”
      11. Under recommended select “Edit issue”
      12. Select the “Start Date” field to edit and enter in the box
      13. “Turn on rule” - give it a name and you are done!

    Jira screenshots 2

    The epic will only be updated once, as the first condition under the “Branch” checks the status. If the epic is already “In Progress” then the “Branch” portion of the rule will not run. That is it; you have set up the rule to attach the epic to the associated stories so it will follow the stories as they progress through the backlog. Screenshots of the entire rule are below:

    Jira Screenshots 3

    The setup of the automation rule to add a “Due Date” when the story and epic have moved to “Done” follows the same steps as the rule we just set up with one additional step under the “branch” portion. The selections under the steps will be different, and we will edit the “Due Date” field. Screenshots of the entire rule are below (the additional step is the one inside the black box in the screenshot below).

    Jira Screenshots 4

    1. Branch
      1. Select the “FOR EACH: Add a branch”
      2. “Branch rule / related issues” option
      3. Under “Type of related issues” select “Parent”
      4. Select “IF: Add a condition”
      5. Under Recommended options select “Issue fields condition”
      6. Field = “Status”, Condition = “does not equal”, Value = “Done”
      7. Select “IF: Add a condition”
      8. Select “Related issues condition” (additional step for “Due Date”)
      9. Related issues = “Children”, Condition= “All match specified JQL”, Matching JQL= “status = “Done””
        1. This condition will check and confirm that all stories are “Done”; if they are then epic will be moved to “Done”, if they are not then the action part of rule will not run and epic will not be updated
      10. Select “THEN: Add an action”
      11. Under Recommended select “Transition issue”
      12. Set the Destination status to “Done”
      13. Select “THEN: Add an action”
      14. Under recommended select “Edit issue”
      15. Select the “Due Date” field to edit and enter in the box
      16. “Turn on rule” - give it a name and you are done!
        Jira Screenshots 5

      Now that you have set up these automations, you do not have to worry about the challenges that my teams and I faced previously— your epics will stay updated! Not only will the epic’s status stay updated, but you will also have one additional benefit— all the stories and epics will have the actual “Start Date” and “Due Date” fields populated. One advantage of having the start and due dates on all the stories and epics is that the “Timeline” feature looks nice and clean. Another good thing about this automation is that it will overwrite any existing dates that you may have put on the epics or stories during planning sessions, so the dates that you see on the story or epic will be the actual date the story/epic move to “In Progress” or “Done.” One additional benefit of having the dates populated is that you can get the cycle time for the story or epic by clicking on it— it will show you the “Start Date” and “Due Date.” I would also recommend updating the card layout under your board settings and adding “Start Date” and “Due Date” fields to be visible on the stories when displayed on the board. One more thing to mention is that users will receive email notifications from "Automation for Jira" for any actions performed, from status changes to updating the "Start Date" or "Due Date" fields. I hope this automation will help you/your teams and take some work off your hands. Follow along for future articles!



     

    More from the blog

    View All Blog Posts