Forums

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

Default value of a custom field

Deleted user April 6, 2022

Hello,

We have several numeric fields that should never be empty, so in the field configuration, we have determined that its default value is 0. The problem is that if a user reports this field and then deletes it, the field remains empty. Is there any way that if the field remains empty, it defaults to 0?

Thanks!

1 answer

0 votes
Ste Wright
Community Champion
April 6, 2022

Hi @[deleted] 

A default value is just at creation. But, you have a few options to meet the above need:

  • Required: Make the field required, so it cannot be blank. See how to do this on this help page
  • Automation: Use Automation to populate the field if it's blank. For example your rule might be...
    • Trigger: Field Value Changed - field name
    • Condition: Issue Fields Condition - field = <<EMPTY>>
    • Action: Edit Issue - field - populate with 0

^ It depends on whether users are likely to keep the field data accurate or not, when they want to make it empty.

If they might enter any random number and that could skew your reporting, I'd lean towards the automation as a good alternative.

Ste

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events