I created a custom Last Public Comment Date field to use in my projects, but it displays as the time since, not date/time. Is there a way to change how this displays in a screen/column, or do I have to finagle a new date/time field and run some automation to push the information the this field?
Well, if the info from the support tech is correct, the field is really just poorly named. Still, they opened a new feature request for this, since the last one was closed due to lack of engagement. They also suggested using an automation rule, as expected.
At the moment, it's not possible to change the date format of this type of field.
Although there are options in Jira to change the date format, it won't affect the Days since last comment and Last public comment date fields.
There was a feature request suggesting this option and it was closed as "Won't fix", but I raised a new one suggesting it:
In line with our Feature Request Policy, we'd suggest you vote for it as well as set yourself as a watcher in order to hear about updates on the development cycle. I also went ahead and linked this ticket in a private comment to provide more visibility on the feature request.
The suggestion in Community is a good option and I tested two options here.
By using the smart value {{{}issue.comments.last.created.jiraDate}} it will show the date only.
The smart value {{{}comment.created.convertToTimeZone("America/Sao_Paulo").shortDateTime}} will show the date and time based on the desired timezone.
To find the correct timezone, you can use the link below and copy the value from the Canonical ID column and just replace it in the example I shared.
Here is the result:
Hope this helps!
If I can provide any additional assistance please let me know!
Kind regards,
Angélica Luz
Atlassian Support | Cloud
What I ended up doing was actually using the {{comment}} smart value: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--comment--
The {{comment}} smart value will allow you to access the property .internal, so you can ensure only public comments are captured. This does property doesn't seem to be available for {{issue.comments.last}} However, the {{comment}} smart value only works with the comment trigger, so it's only a "going forward" action. If someone wanted to back date, it would be a bit more work to ensure you're only getting the public comments. If you wanted to do all comments, that's much easier using the aforementioned {{issue.comments.last}} smart value.
Shoutout to @Johan Eckerstrom - {Eficode} for the info on value to field order on the compare block: https://community.atlassian.com/t5/Jira-questions/How-to-reference-the-last-public-service-desk-comment-with-smart/qaq-p/972379
For those curious, I tried both a date picker field, and a date/time picker field. The date/time picker field had the behavior that @Joseph Chung Yin mentioned (mm/hh/dd for under 7 days, then standard date/time for over 7 days), at least when using {{issue.comments.last}}. Using just the date picker forced it to show the standard date all the time.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is my understanding that if you created the field using the "Days since last commented" as the data type, then it is not possible to display the value in date/time.
I would recommend you to check with Atlassian Support (https://support.atlassian.com) for additional assistance.
Best, Joseph Chung Yin
Jira/JSM Functional Lead, Global Infrastructure Applications Team
Viasat Inc.
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 update. Take a look at this post below, it should follow on the default display as by design - https://community.atlassian.com/t5/Jira-Software-questions/Comments-date-time-format/qaq-p/2033028
However, from your image that you do have value which are greater than 7 days. So it is strange to me. So you should still follow-up with Atlassian Support to see what they have to say in regards to the "Last Public Comment Date" data type.
For automation rule, you can try the following suggestion to control the date display
- https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/
Example -
{{issue.comments.last.created.jiraDate}}
Which willl display the date in the format of
2022-01-25
Hope this helps.
Best, Joseph
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI @AJohnston ,
Likely it would be the later with automation.
The issue has been raise to have that option but still open.
https://jira.atlassian.com/browse/JSDCLOUD-5611
Thanks,
Ben
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.