Text field can be created without requried "textField" attribute

Description

It is possible to create a custom field with type "TEXTBOX_SHORT" or "TEXTBOX_LONG" without specifying "textField" attribute. In this case when we try to add custom field we will get an NPE.
POST /custom-fields with following body passes validation and successfully creates custom text field.

This issue might also happen for type "SINGLE_CHECKBOX" and "checkboxField" attribute.

Expected behaviour:

Above request should return an error if "textField" attribute is missing.

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

None

Checklist

hide

TestRail: Results

Activity

Show:

Dima Tkachenko January 31, 2020 at 2:02 PM

Attempt to validate maxSize attribute of textField with JSON schema constraints (minimum/maximum) failed due to https://folio-org.atlassian.net/browse/RMB-521. So the validation is done by Java code

Done

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Spitfire

Fix versions

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created January 29, 2020 at 1:03 PM
Updated February 6, 2020 at 1:51 PM
Resolved February 6, 2020 at 1:51 PM
TestRail: Cases
TestRail: Runs