crater icon indicating copy to clipboard operation
crater copied to clipboard

Custom fields always set as required

Open MrLuFo opened this issue 2 years ago • 3 comments

Describe the bug When creating or editing a custom field, the field will always be a required field. It shows as a required field in the list and when creating a invoice, customer etc. with the field.

EDIT: In the database, is_required in table custom_fields has value 0 for the field in question, even though it still shows up as required in the ui.

Expected behavior If "Required" is not selected when creating a field, that field should be optional.

Screenshots image image image

Please complete the following information:

  • Crater version: 6.0.6
  • PHP version: 7.4.3
  • Database type and version: SQLITE 3.31.1

Optional info

  • OS: Ubuntu 22.04 LTS
  • Browser: Firefox, MS Edge

MrLuFo avatar Feb 05 '23 13:02 MrLuFo

I feel like this issue might be specific to SQLite DB but we are looking into it.

mohitpanjwani avatar Mar 09 '23 09:03 mohitpanjwani

@MrLuFo I tried to look into this, but I cannot reproduce the issue as specified.

The fields are working as expected. Tested with Mysql and SQLite databases. No issues.

khatriafaz avatar Aug 10 '23 14:08 khatriafaz

@MrLuFo I tried to look into this, but I cannot reproduce the issue as specified.

The fields are working as expected. Tested with Mysql and SQLite databases. No issues.

I can reproduce this easily. Every custom field we set is required. More crucially, the toggle state of every boolean custom field is not recorded, making custom fields themselves entirely pointless. Text fields are recorded initially, but when the customer or invoice is edited, the field is reset on submission.

profiteroles1 avatar Feb 22 '24 21:02 profiteroles1