Customfield inserts in database.

When an issue is created and a customfield is not set in JIRA, no inserts are made into the mysql database. Therefore the following condition in the workflow will not be satisfied, and the JIRA issue not able to be closed.

if customfield is null

Is this the way JIRA should function? And if so, is there a way in which I am able to make an insert with a value of NULL for the empty (unset) customfield?

2 answers

0 votes

Yes, it deliberately puts nothing in the database when a custom field is left empty.

It should be irrelevant to you though, as the UI, REST and internal code all recognise and handle that as "no value set".

The way you have phrased this suggests you might be trying to insert data with SQL.  NEVER do that with a JIRA database.

Hi Nic, thanks for your answer. No I am not trying to insert any data via SQL. On the other hand, in the JIRA workflow, I have set a condition, which enables an issue to be closed if and only if the value is not set (i.e. is NULL). Naturally if nothing is inserted into the database the customfield value  does not exist (and therefore is not NULL), hence users are unable to close an issue. Could you suggest a workaround for this problem?

There's no problem there, and you're over-thinking something.  The API knows that a custom field is empty and you use that in your condition.

Could you show us what you've got for your condition?

FYI - JIRA Workflow Toolbox (paid for add-on) has a validator to check if a custom field has been initialized (not null).

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,798 views 11 18
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot