Jira Automation Rules : Update a Timestamp field

Sometimes is good to get the exact Date and Time when works on a task actually start, it can be different data than creation date. It could depend of the workflow and when a ticket pass from an analysis/investigation stage to a work in progress.

We will talk about Workflows in later post, but for now we will use the default workflow : To Do -> In Progress -> Done

So that, the objective of this post is to update a custom field with the current Timestamp when a Bug ticket is move to “In Progress” , on that way, we will get a relevant data for further analysis in reports.

Adding the Timestamp field on Bug ticket

1- Go to Project Setting -> Issue Types -> Bug

2- Add a Timestamp field just under Assignee field

3- Set as Field Name “Date Work in Progress” for example

4- Save the changes, then, the field will appear on the ticket as below:

Ok, we have the field on the right place, now we need to create an automation rule that will update the field once the Bug ticket is moved to “In progress” status.

Create the Automation Rule

1- Go to Project Setting -> Automation

2- Click on Create Rule

3- Select Issue Transitioned as Trigger

4- Select “In Progress” for “To Status” and click in Next

5- Now add a Condition, by clicking on

6- Click on “Issue fields condition

7- This automation should apply to Bugs tickets only, then set the condition as below:

click on Next

8- Then , Click on “Add an action”

6- Click on “Edit issue”

7- Select the last field created “Date Work in Progress“:

8- We will use a powerful feature of Jira, called “smart values” . Through this commands we can get specific data from Jira API. For this example just write the command {{now}}

This command will return the date in the format : Nov 1, 1979 6:23 AM

but you can use another options like:

{{now.jiraDate}} => 1979-11-01
{{now.format("dd/MM/yyyy")}} => 01/11/1979
{{now.shortDate}} => 11/1/79

then , click on Next

This is the final structure of the Automation rule

click on “Turn On rule

9- Set a Rule Name and as “Private” for Who can Edit it

10- Finally click on “Turn on rule

Testing the automation rule

Now is time to test the rule.

1- Open a Bug ticket, on this example, the ticket is on “To Do” and the “Date Work in Progress” field is empty

2- Change the Status to “In Progress“, the custom field should be updated automatically

it means that the rule worked successfully, so from now and so on , we have a very useful value to use in our reports

CATEGORIES:

Jira

No responses yet

Leave a Reply

Your email address will not be published. Required fields are marked *