Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Create custom Time field

NCATS LAB
Contributor
October 3, 2018 edited

I am looking for a way to create a field that supports only Time - NOT DateTime. I want to be able to enter a time in H:mm format. I know about exiting the global context for jira.date.time.picker.java.format, but I have other fields that need this. I can't use Number field, as I can't enter colons. I don't want a text field, as this needs to be a valid time format.

I have tried to add the following in the description of a custom field:

<script type="text/javascript">
{document.getElementById("customfield_11700").format = "H:mm";}
</script>

but this does not seem to work.

When trying to manually edit, I get:

customfield_11700: Invalid date format. Please enter the date in the format "dd/MMM/yy h:mm a".

I think the best way forward would be to somehow override the validation, but I can't seem to figure out how.

I would prefer to do this with javascript injection instead of a plug-in, as I am not authorized to acquire any more plugins (and we do not have script-runner).

1 answer

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 3, 2018

You will need to find or write an app that provides a custom field of this type.

NCATS LAB
Contributor
October 3, 2018

Nic, thank you for your response. Do you have any recommendations on where to begin?

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 5, 2018

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian community, loom ai, atlassian loom ai, loom, atlassian ai, record recaps of meetings, meeting recaps, loom recaps, share meeting recaps,

Loom’s guide to great meetings 📹

Join us to learn how your team can stay fully engaged in meetings without worrying about writing everything down. Dive into Loom's newest feature, Loom AI for meetings, which automatically takes notes and tracks action items.

Register today!
AUG Leaders

Atlassian Community Events