Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #9415 Cannot set regex for Custom Field via API. #9443

Merged

Conversation

inietov
Copy link
Collaborator

@inietov inietov commented Apr 15, 2021

Description

The validator in the CustomFieldsController reached when a Custom Field is intended to be created via API has a fixed set of formats that ignores custom regexed ones. This change handle those use cases, I think like is a little bit 'clever' and I know how @uberbrady feels about those changes, but I couldn't find another way without change the behaviour of the existing API.

Other fix I though was that if the user needs a Custom Regex format, they probably could add an aditional parameter to the API call custom_format or something like that. But let me know what you think, if this works to keep it simpler, if is better to implement the extra parameter, or if you think of another better way. Cheers!

Fixes #9415

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Test Configuration:

  • PHP version: 7.4.16
  • MySQL version: 8.0.23
  • Webserver version: nginx/1.19.8
  • OS version: Debian 10

Checklist:

@inietov inietov requested a review from Godmartinz April 15, 2021 21:24
@snipe snipe merged commit 36bc47c into snipe:develop Apr 20, 2021
@inietov inietov deleted the fixes/cannot_set_customfield_regex_via_api branch April 20, 2021 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants