3 bugs. Default values, required values in forms, and instructions for forms

Version

c4b4a53cad7722f031b725f8b41511e9d341d033 (Dec 13 2019) (branched from 54bcbdaba94a3573e128c6498816dbfa41d3a9cb on origin)

Reproduce data:

Custom form fields

"myfield": {
    "name": "Do something here",
    "caption": "",
    "instructions": "WARNING: Do not do something here"
    "type": "remarkup",
    "view": true,
    "required": true
  }

Custom subtype

[
	{
		"key": "mysubtype",
		"name": "Dont mess up",
		"color": "blue",
		"icon": "fa-ban",
		"fields": {
			"custom.myfield": {
				"disabled": true
			}
    },
    "children": {
      "subtypes": ["default"]
    }
	}
]

Bug 1

Although the documentation says that the “instructions” property in the custom fields can be markup, it does not render any markup. It does not render plaintext also. It also does not show required even if marked as required.

Bug 2

If a form is created with custom fields, and the default value of the custom field is later set, the form does not pick it up.
Steps:

  • Create a form with the custom field. Set an arbitrary value for myfield from create form.
  • Change the value of “default” in the above custom field.
  • Remove the arbitrary value from the newly created form.

It will not pick up the default value that is set. Only way around it is to re create a new form. Breaks many things.

Bug 3

Even if a custom field is disabled in the subtypes, if a task is assigned this subtype, it will throw an error that the disabled field is required.
Steps:

  • Create a task
  • Change task subtype to mysubtype.
  • Create a subtask

It will say myfield is required, although myfield is disabled in the subtypes fields.