Skip to content

"Unsaved changes" dialog shown when closing feature form without editing — date/datetime fields auto-updated on open #4504

@RastoHu

Description

@RastoHu

Description

When opening a feature form in view mode (no edit) and closing it, the app shows an "Unsaved changes — Do you want to save the changes?" dialog. No changes were made by the user. The dialog is unexpected and should not appear.

Additionally, the date and date-time field widgets appear to be auto-updated to the current date/time when the form is opened, even without the user entering edit mode. These values are not synced, but the auto-update is likely the root cause of the false "unsaved changes" dialog.

This appears to be a regression of #3671 (fixed in 2025.2.0) and reproduces in 2026.2.0.

Environment

  • PROD

Application (+ app version, build, operating system)
Mergin Maps iOS 2026.2.0 / iOS 26.4

Steps to reproduce

  1. Open project tester-ws-1/preview_mode_bug
  2. Tap a feature in the POI layer and expand its feature form (view mode — do NOT tap Edit)
  3. Observe the date and date-time field values in the form
  4. Tap back / close the form without making any changes

Actual results

  • "Unsaved changes — Do you want to save the changes?" dialog appears on most (but not all) POI features
  • Date and date-time field widgets appear to show the current date/time (auto-updated on open) rather than the stored values
  • Tapping "No, thanks" discards — no data is changed on sync (correct behaviour)

Expected results

  • No "Unsaved changes" dialog when closing a form that was only viewed
  • Date and date-time field values should show the stored values unchanged when opening in view mode

Screenshots or logs

ScreenRecording_05-19-2026.10-51-54_1.MP4

Conclusion
Created by Claude and supervised by a human test analyst.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugformsrelated to attribute forms

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions