Hi all,
I create a custom field to take the current date and time when an issue is created.
However, the default time is not the same as the current time. In my example below, the default is showing as 11:25PM, when I created that on 1:25PM as shown in the system date on my computer.
How can I fix this?
The issue you're describing, where the time recorded in a custom field is different from the system time when the issue is created, often relates to a timezone discrepancy between Jira and your local system or a misconfiguration in your custom field settings. Here are a few steps that can help you resolve this issue:
1. Check the Timezone Settings in Jira:
- Go to your profile avatar in the top right corner, and select Profile and Visibility.
- Check the Time Zone in the Preferences section and ensure that it matches your local time zone.
- If it doesn't, adjust it to the correct time zone.
2. Verify the Server Timezone:
- If you are a Jira administrator, verify that the server's timezone is correctly set, as it may also impact the recorded time.
- Navigate to System Settings > General Configuration > Advanced Settings. Check for jira.default.timezone and ensure it’s correctly set.
3. Revisit Your Custom Field Configuration:
- Check how you have configured the custom field that stores the date and time.
- Ensure that there are no scripts or automation rules altering the recorded value inadvertently.
4. Automate with a Post Function:
- If the custom field is intended to capture the creation date and time automatically, consider using a post function on the Create Issue transition in the workflow to set the value of this field to the current date and time.
5. Use Jira Misc Custom Fields:
If you have the Jira Misc Custom Fields (JMCF) app installed, you can create a Calculated Date-Time Field that captures the creation date and time accurately.
Hi @Peter_DevSamurai ,
Thanks for your quick reply.
1. The time zone and language settings are all correct.
2. I can't find the jira.default.timezone from Settings > System > General configuration.
3. The only configuration on the custom field is to take the current date and time. If I remove the tick mark on this option, then the field will be blank on create.
4. For the post function, this may not address the business requirements because this will only take effect after saving the issue.
5. I'll check this app if this can be used. But we are trying to avoid any of new app to be added into our cloud system.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Zaldy Parian
Jira Cloud stores all date/time values as UTC in the database, so I expect what you are seeing there is the UTC time.
Looking at the discrepancy you noted between your time of 1:25 pm and the default time of 11:25 pm, do you happen to be in a timezone that is 10 hours behind UTC?
On a side note, since the date and time of creation is already saved in the built in Created field, what is the use case for having a second, custom field to have that same information?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Trudy Claspill ,
The time discrepancy is due to the time value when I set up the Default value (it took the current time). And when creating an incident, whatever the time when I saved the custom field, it will set as default.
We use the field 'Incident time' to get a record of when the incident actually happend. A customer may call an hour or so, after the first occurance of the incident. Which is something Created field will not give justice.
Cheers,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh, I see. The problem is that the default value is now hard coded vs. taking the current time at the time the incident is created.
I would suggest that you don't set a default value for the field in the field configuration and instead automate setting the value to the current date/time if no value is selected by the person creating the incident.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes correct. The behaviour of the field takes the date/time when the default value of the custom field was set/save.
I also considered automating it, but the problem with it is that effect is after saving the issue record. Same effect with workflow Post function method.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Actually, I don't seem to be able to recreate quite the same problem in my Jira Software Free subscription.
I have a custom date/time field for which I set the default value to current date/time. In my profile timezone of America/Los Angeles it is currently 9/27/23 at 12:03 am. The time that is shown in the custom field is 7 hours behind, but if it was using UTC I would expect it to be 7 hours ahead.
If I wait a few minutes and then try to create an issue that includes that field. I see that the time is updated to reflect exactly 7 hours behind my current local time (which is now 9/27/23 12:10 am).
So, I don't seem to be getting a hard coded value coming through when I actually create the issue, but I'm also not getting either a date/time that matches my timezone setting or the correct date/time for UTC.
I'm going to raise this in a Slack channel where I communicate with other Atlassian users to see what other people observe.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Zaldy Parian
Other users (in the US) that I have talked to through Slack are seeing the same discrepancy I see. So far nobody has confirmed that they encounter the same problem you say you have - that the date added to the field during issue creation is hard coded as the date that showed in the Context for the field when you saved it.
I recommend that you open a case directly with Atlassian Support for additional guidance.
https://support.atlassian.com/contact/#/
It would be great if you report back here what you learn.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Trudy Claspill . I'll contact Atlassian Support.
Appreciate your help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Btw, this is how it looks in the default setting....
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.