Date field display

AJohnston
Contributor
October 26, 2022

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?

Screenshot 2022-10-26 at 11.42.02 AM.pngScreenshot 2022-10-26 at 11.40.52 AM.png

3 answers

1 accepted

2 votes
Answer accepted
AJohnston
Contributor
October 28, 2022

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:

Screen Shot 2022-10-28 at 6.05.39 PM_2022-10-28T21_06_30.537Z.png

Hope this helps!

Screen Shot 2022-10-28 at 6.01.29 PM_2022-10-28T21_06_51.150Z.png

If I can provide any additional assistance please let me know!

Kind regards,
Angélica Luz
Atlassian Support | Cloud

AJohnston
Contributor
November 3, 2022

What I ended up doing was actually using the {{comment}} smart value: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--comment--

Screenshot 2022-11-03 at 2.39.58 PM.pngScreenshot 2022-11-03 at 2.41.21 PM.png

 

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.

0 votes
Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 26, 2022

@AJohnston -

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.  

2022-10-26_12-07-51.png

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.

AJohnston
Contributor
October 26, 2022

I used "Last Public Comment Date" which is further down in that list.

Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 26, 2022

@AJohnston -

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

AJohnston
Contributor
October 28, 2022

Thank you for the advice. I have opened a ticket. I'll update this ticket with their answer.

0 votes
Benjamin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 26, 2022

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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events