Hello All,
I created this automation to update the summary when a field value changes:
I have managed to get the date format the way I want it but I am struggling to set the correct time in the summary.
In the Automation the date field referees to customfield_12025 which is the "Start Date ann Time (DP)" field:
As you can see the time is set to 2:30 PM.
But when I trigger the Automation the wrong time comes up, the time reads 12:30 instead of 14:30 or 2:30 PM:
I've tried the following to get the correct time:
None of these seem to work they just leave out the date and time completely, like this:
Any advice?
Hello @Mareli
I have two recommendations.
First try swapping the time zone conversion and format functions. Both apply to a date/time value, but with the current order you are trying to apply timezone conversion to a formatted string. Try this order:
{{issue.customfield_12025.convertToTimeZone().format()}}
Second, I don't think the codes you are trying for time zone conversion are valid. In the documentation for the time zone conversion function...
...there is a link to a document from which you can get the valid entries to use for all the time zones.
https://joda-time.sourceforge.net/timezones.html
I don't see SAST or CAT in that list.
Hi @Trudy Claspill
IT WORKED!
Thanks so much:
I used this one:
{{issue.customfield_12025.convertToTimeZone("UTC+02:00").format("EEE, dd MMM yyyy HH:mm")}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey - so i am looking for something similar here, please?
If a user sets the datetime field to 1:30pm and their account settings timezone is America/New York - and I go to see it, the time shows as 10:30 PM for me (my timezone is Africa/Johannesburg)
How can i make the date time field static so it the same time for everyone REgardless of the account settings timezone?
Thank you in advance
Yatish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Yatish Madhav
The short answer is you cannot do that.
Date/Time fields in Jira are designed to change based on the timezone preference of the person viewing the data.
If you want a static value, you could consider copying the value from the date/time field to a text field.
But I would first ask you why you need the date/time to show a fixed timezone to all users. What problem are you trying to solve by doing that?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Additionally, given that this Question has an accepted answer and otherwise has not been updated in over 6 months, I recommend that you start a new thread for your help request by clicking on the Ask a question button at the top of the screen.
Updating an existing Question notifies only the original author, the people that replied and the people that are Watching the post. That greatly limits the visibility of your question to the wider community. If you start a new Question it will show higher in the list of Questions (sorted by create date DESC) and will show up in the Unanswered filter, resulting in greater visibility to the wider community and more people potentially providing suggestions.
Also, adding to a post that is over 6 months old is considered "necroposting" and is discouraged in the community Guidelines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks so so much, @Trudy Claspill - appreciate the answer and the recommendation. I will remember that in future. I never knew about necroposting as a bad thing until this comment. Thanks. I only commented here as it was more contextual to this post and thread.
RE my use case, it is around staff off boarding and we want HR teams to post the last date , hour and minute ... and being a global team, we need to know and capture (in some other automation) the date and time as it was logged REGARDLESS if the HR team member has timezone Africa/Johannesburg or America/Phoenix OR Australia/Sydney OR elsewhere. It was really confusing when I spotted the differences in time and figuring it out with user timezone settings.
Thank you
Yatish
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.
Hi @Mareli
Could you try {{issue.customfield_12025.jiraDate}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Marc - Devoteam
This one did not work it does not give me the time and also the format is not correct
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.