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

[BUDI-7559] Postgres Update Row action step - incorrectly triggers required field validation #11887

Open
1 task done
melohagan opened this issue Sep 26, 2023 · 0 comments
Open
1 task done
Labels
bb-automations Budibase Automations related work bug Something isn't working env - production Bug found in production firestorm Data/Infra/Revenue Team Medium priority Created by Linear-GitHub Sync warn A high priority bug needs looked at

Comments

@melohagan
Copy link
Collaborator

melohagan commented Sep 26, 2023

Checklist

  • I have searched budibase discussions and github issues to check if my issue already exists

Hosting

  • Self
    • Method: docker compose
    • Budibase Version: 2.10.10

Describe the bug
When using the Update Row action step in automations, required field validation is incorrectly triggered.

To Reproduce
Steps to reproduce the behavior:

  1. Create a Postgres table with some not null constraint fields
  2. Insert some rows
  3. Add an automation with an Update Row step for the Postgres table
  4. Leave those required fields blank in the automation step (i.e. should skip)
  5. See that the validation is triggered on update, even though no attempt is being made to remove the required fields

Expected behavior
An Update Row action step in automations should not trigger validation for a required field if that field is left untouched.

Screenshots
Screenshot 2023-09-26 at 09 44 27

Screenshot 2023-09-26 at 09 45 12

Field is empty in the automation step, and should be ignored

Additional context

Having a quick look at the code, it appears that the update row step may need to pass in the allowEmpty flag.

res = validateJs.single(row[fieldName], constraints)
@melohagan melohagan added bug Something isn't working bb-automations Budibase Automations related work env - production Bug found in production labels Sep 26, 2023
@melohagan melohagan changed the title Postgres Update Row action step - incorrectly triggers required field validation [BUDI-7559] Postgres Update Row action step - incorrectly triggers required field validation Sep 26, 2023
@melohagan melohagan added firestorm Data/Infra/Revenue Team Medium priority Created by Linear-GitHub Sync labels Sep 26, 2023
@github-actions github-actions bot added the warn A high priority bug needs looked at label Dec 25, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 1, 2024
@melohagan melohagan reopened this Jan 3, 2024
@github-actions github-actions bot removed the warn A high priority bug needs looked at label Jan 3, 2024
@github-actions github-actions bot added the warn A high priority bug needs looked at label Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bb-automations Budibase Automations related work bug Something isn't working env - production Bug found in production firestorm Data/Infra/Revenue Team Medium priority Created by Linear-GitHub Sync warn A high priority bug needs looked at
Projects
None yet
Development

No branches or pull requests

1 participant