MerginMaps / mobile

Mobile app for Mergin Maps 📲. Open QGIS projects and manage vector data on your phone, even offline 📶 (Android/iOS/Windows app)
https://merginmaps.com
GNU General Public License v2.0
294 stars 64 forks source link

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

Closed saberraz closed 3 months ago

saberraz commented 4 months ago

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

tomasMizera commented 4 months ago

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

VitorVieiraZ commented 3 months ago

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

saberraz commented 3 months ago

I have a project to test it with

mergin-maps-bot commented 3 months ago

@VitorVieiraZ please coordinate with @saberraz to test the project

tomasMizera commented 3 months ago

@VitorVieiraZ please coordinate with @saberraz to test the project

It was me :D

wonder-sk commented 3 months ago

@VitorVieiraZ I have a test project + steps to reproduce

jozef-budac commented 3 months ago

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

VitorVieiraZ commented 2 months ago

@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.