I added a custom field and now want to create an automation that will timestamp it when I move from one column to the next:
My automation so far:
When: Issue Transitioned FROM To Do TO In Progress
Edit Issue > More options
{
"Custom Field Name_10424" :
}
Is this the right way to do it? I did not see custom fields under the Choose fields to set... drop down. If I need to code under More Options, what is that code?
I appreciate ya!
Hello @Penry John
Welcome to the community.
When you say you want the custom field timestamped, so you mean you want to store the date/time of the transition in that field?
If you want to set a field value in your automation, and assuming that it is the custom field that you need to set, then yes, you will need more code in your More Options section. This document provides guidance on advanced editing of custom fields in Automation Rules using JSON.
https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/
We need some additional information to provide you with more advice.
What is the data type of the custom field? You would have had to select this when making the custom field.
Is "Custom Field Name_10424" the name that you gave to the field?
Thank you for your response. Hopefully, the answers below help clarify
Correct, I do want the date/time stored in this field when an issue moves FROM To Do TO In Progress
Looking at the link I see where I could set a custom field with a fixed timestamp but not one that says NOW.
My current JSON looks like this
{
"Custom Field Name_10424": {now}
}
Thanks again for your response!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Penry John
If you are going to use it this way, it should be double {}, like this {{now}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And it should be in quotes.
Also you need to provide the actual field Name or the field ID, and I believe you need to provide the "fields" section in the JSON or the "update" section. Here are three examples that should work.
{
"update": {
"Cycle Time - Start": {
"set": "{{now}}"
}
}
}
{
"fields": {
"customfield_10424": "{{now}}"
}
}
{
"fields": {
"Cycle Time - Start": "{{now}}"
}
}
You can also use the Log Action to log values into the Rule Audit Log if you want to see what values the Rule is working with.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Penry John
First of all, welcome to the Atlassian community.
Regarding your question, Automation grants the use of Smart Values.
In your case, it will fit the use of {{now}}
Here is documentation so you can check further regarding the format you need:
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/
Also, you don't need to use the advance options, you can use the smart value like in the following example:
Kindly review my comment and let me know if you need further help.
Regards,
David
ServiceRocket.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your response.
In the Choose fields to set I do not see my custom field I created. Is there a way to import that into that drop down?
I assumed that I will need to do advanced field editing to Edit issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Penry John
It should appear there by name, if not, try to check on the custom field context to check if there is available a context for the project.
If you want to use the Advance field editing, it should be:
{
"fields": {
"customfield_10424": "{{now}}"
}
}
If for some reason, it gives an error on the log, try to check the proper format for now, you can check that on this document:
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Penry John
As an alternative, you can try Status Time Reports app developed by our team. It mainly provides reports and gadgets based on how much time passed in each status.
Here is the online demo link, you can see it in action and try without installing the app.
If you are looking for a free solution, you can try the limited version Status Time Free.
Note: If you are interested in cycle and lead time, you can have a look at the article below.
Cycle Time and Lead Time in Jira: Productivity Measurement with Two Critical Parameters
Hope it helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Penry John
If you are OK with using a marketplace app for this, our team at OBSS built Time in Status for this exact need. It is available for Jira Server, Cloud, and Data Center.
Time in Status mainly allows you to see how much time each issue spent on each status and on each assignee.
The app also have 4 types of date reports that show the First/Last transition date Ta/From a status.
The app calculates its reports using already existing Jira issue histories so when you install the app, you don't need to add anything to your issue workflows and you can get reports on your past issues as well. It supports both Company Managed and Team Managed projects.
Time in Status reports can be accessed through its own reporting page, dashboard gadgets, and issue view screen tabs. All these options can provide both calculated data tables and charts.
And the app has a REST API so you can get the reports from Jira UI or via REST.
Using Time in Status you can:
https://marketplace.atlassian.com/apps/1211756/
EmreT
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your help. The third suggestion worked the best.
{
"fields": {
"Cycle Time - Start": "{{now}}"
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.