How to create % custom field in Jira?

Bunty November 19, 2018

Hello All,

Any idea on how to create a number custom filed with %.

For Example - Custom field should accept only numbers with a percentage symbol(100%). It shouldn't allow the user to create the custom field with string.

Any help would be appreciated??

Thanks,

Manikanta.

2 answers

0 votes
LarryBrock
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 27, 2018

Hello @Bunty!

Great news, Nic suggested writing your own add-on but that's not necessary.  Turbo Kit for Jira has a "Regex Validated Single Line Text Field" custom field so you can enforce just about any kind of input desired, including a percentage.  You can find information about TK4J in the Atlassian marketplace.

(Full disclosure:  I work for the company that wrote TK4J, Praecipio Consulting.)

Hope this helps,
~~Larry Brock

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 19, 2018

You will need to write an add-on to provide this if you want to do it properly.

Otherwise, you could use a text field and then wrap some "Behaviours" around it to validate the entry is good.  But Behaviours can't stop people getting it wrong in several places, so you'd also need a listener to catch changes to the field, validate them and then re-edit the issue to undo them (which will annoy your users)

However, there's a reason a % field is not built into Jira - it's very rare that you actually want to enter it.  Almost every use case is that the % should be calculated from something else.  This is where Scriptrunner scripted fields would kick in - you'd write the calculation in there and they'll display the %.

Suggest an answer

Log in or Sign up to answer