corteza icon indicating copy to clipboard operation
corteza copied to clipboard

When inserting a second entry into a module with a date & name duplicate check, it fails

Open dploeger opened this issue 1 year ago • 6 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Version of Corteza

2024.9.0

Current Behavior

I have a module, that uses a duplicate validation with two fields: name and date. Name is a string and date a date/time field.

When I add a second entry to it with the same name but a different date, I get a validation error.

Expected Behavior

When one of name or date are different, the entry would be added without a problem

Steps To Reproduce

  1. Add a module with two fields: name (string) and date (date)
  2. Configure both of these fields for the duplicate validation
  3. Add a first entry
  4. Add a second entry with the same name, but a different date

Environment and versions

The server is running in Kubernetes, the browser is a Zen Browser 1.0.2-b.2 (Firefox 133.0.3) (64-bit)

Anything else?

No response

dploeger avatar Dec 27 '24 10:12 dploeger

Can you show the duplicate value detection configuration?

Fajfa avatar Jan 06 '25 08:01 Fajfa

grafik

Here it is

dploeger avatar Jan 06 '25 08:01 dploeger

This value constraint will raise an error if any of the field values exist in any other record.

Fajfa avatar Jan 06 '25 09:01 Fajfa

How to make it so that it combines both. So it raises an error if a field has BOTH values?

dploeger avatar Jan 06 '25 10:01 dploeger

You could use a workflow to check the desired conditions and then raise an error.

Fajfa avatar Jan 06 '25 10:01 Fajfa

Stale issue message

github-actions[bot] avatar Apr 01 '25 00:04 github-actions[bot]