The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

How to create % custom field in Jira?

Bunty
Contributor
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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
LarryBrock
Community Champion
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-
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 Champions.
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 %.