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, team '25 europe, atlassian event, barcelona 2025, jira, confluence, atlassian intelligence, rovo, ai-powered collaboration, developer tools, agile teams, digital transformation, teamwork solutions, atlassian conference, product announcements

🌆 Team '25 Europe registration is now open!

Join the largest European gathering of the Atlassian Community and reimagine what’s possible when great teams and transformative technology come together. Plus, grab your Super Fan ticket now and save over €1,000 on your pass before prices rise on 3 June.

Register now
AUG Leaders

Atlassian Community Events