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

"Unique" and "Enforce Unique constraint" does not work #3457

Closed
saberraz opened this issue May 24, 2024 · 8 comments · Fixed by #3520
Closed

"Unique" and "Enforce Unique constraint" does not work #3457

saberraz opened this issue May 24, 2024 · 8 comments · Fixed by #3520
Assignees
Labels
bug forms related to attribute forms
Milestone

Comments

@saberraz
Copy link
Contributor

I have a sampling layer the auto creates the field station_id off of a prefix, geologist and station_number . And then I have set this field to be "Unique" and "Enforce Unique constraint" in QGIS. In the screenshot below (I had already taken a sample named "SM2024_Elliot_001") it appropriately will not let me save this point (note the red check mark in top right corner!), however it does not give me any warning that the station_id is the culprit! When I add station number to 2 the station_id changes appropriately, and I can save the point. But it would be helpful to get a warning pop up about Unique values just like there are warnings for Null values!
image

@saberraz saberraz added forms related to attribute forms bug labels May 24, 2024
@tomasMizera
Copy link
Collaborator

I can't reproduce it. This is my QGIS setup:
image

and in the app I can clearly see the unique constrain validation:

image

@saberraz let me please know if I am doing something wrong

@tomasMizera tomasMizera added the not-reproducible We could not reproduce the issue, needs input from reporter label May 24, 2024
@saberraz saberraz changed the title "Unique" and "Enforce Unique constraint" based on an expression does not work "Unique" and "Enforce Unique constraint" does not work May 24, 2024
@tomasMizera tomasMizera added this to the 2024.2.1 milestone May 28, 2024
@VitorVieiraZ VitorVieiraZ self-assigned this Jun 11, 2024
@VitorVieiraZ
Copy link
Contributor

I couldn't reproduce the bug either; the functionality is working as expected.

@saberraz
Copy link
Contributor Author

I have a project to test it with

@mergin-maps-bot
Copy link
Member

@VitorVieiraZ please coordinate with @saberraz to test the project

@tomasMizera
Copy link
Collaborator

@VitorVieiraZ please coordinate with @saberraz to test the project

It was me :D

@wonder-sk
Copy link
Contributor

@VitorVieiraZ I have a test project + steps to reproduce

@tomasMizera tomasMizera removed the not-reproducible We could not reproduce the issue, needs input from reporter label Jun 19, 2024
@jozef-budac
Copy link

@saberraz @VitorVieiraZ @wonder-sk .. can you please verify this? Or can share a test project and the steps with me? Thanks

@VitorVieiraZ
Copy link
Contributor

VitorVieiraZ commented Jul 10, 2024

@saberraz @VitorVieiraZ @wonder-sk .. can you please verify this? Or can share a test project and the steps with me? Thanks

Hi Jozef! I have shared it with you here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug forms related to attribute forms
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants