Custom Field Configuration - default value not displaying correctly

I have developed a custom field, that is able to store two values (a number and a unit chosen from a selectbox). Field values are represented by a simple carrier object, that has just getters and setters for the two fields, plus some methods like toString and equals.

It seems that everything works fine, aside from displaying default values. In the field configuration screen, it only shows the String part of the carrier, not the number. I have verified by debugging that the default value chosen is stored correctly, as a number + string. When I click the Edit default value option, it shows what I put in before. However in the main configuration screen it still shows only the unit part.

I have checked my getDefaultValue method and it provides the right carrier filled with data. The program even seems to call the toString method of the carrier, and then proceeds to ignore the result of this method and only picks the String part of the carrier to display.



0 answers

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Wednesday in Jira

Join our webinar: How 1B+ feature flag events helped us build the new Jira

Every time you release software, there's a bit of risk – that there's a bug, that something breaks, or that the feature doesn't resonate with customers. Feature flagging helps make high stakes s...

143 views 0 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you