Skip to content

Fix photo naming expression returning NULL - #4671

Open
xkello wants to merge 1 commit into
bugfix/fix-reuse-last-entered-valuefrom
bugfix/naming-expression-returning-NULL
Open

Fix photo naming expression returning NULL#4671
xkello wants to merge 1 commit into
bugfix/fix-reuse-last-entered-valuefrom
bugfix/naming-expression-returning-NULL

Conversation

@xkello

@xkello xkello commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Description

When a photo naming expression references a field that's blank, QGIS's || concatenation returns NULL for the whole expression. This NULL wasn't caught before being used as a filename, producing invalid names (a leading space, no real name) that the server rejects on sync with no way to fix it from the app.

Fixes: #4622

What changed

In AttributeController::renamePhotos(), after evaluating and sanitizing the naming expression, an empty/NULL result is now detected before it's turned into a filename. In that case the rename is skipped and the file keeps its original, valid name instead.

@xkello
xkello requested a review from Withalion August 25, 2026 14:47
@github-actions

Copy link
Copy Markdown

Coverage Report for CI Build 32861293003

Coverage decreased (-0.009%) to 59.055%

Details

  • Coverage decreased (-0.009%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 5 coverage regressions across 1 file.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

5 previously-covered lines in 1 file lost coverage.

File Lines Losing Coverage Coverage
mm/app/attributes/attributecontroller.cpp 5 73.65%

Coverage Stats

Coverage Status
Relevant Lines: 15770
Covered Lines: 9313
Line Coverage: 59.06%
Coverage Strength: 97.35 hits per line

馃挍 - Coveralls

@github-actions

Copy link
Copy Markdown

馃摝 Build Artifacts Ready

OS Status Build Info Workflow run
macOS Build 馃摤 Mergin Maps 72151 dmg Expires: 23/11/2026 #7215
linux Build 馃摤 Mergin Maps 72411 x86_64 Expires: 23/11/2026 #7241
win64 Build 馃摤 Mergin Maps 64171 win64 Expires: 23/11/2026 #6417
Android Build 馃摤 Mergin Maps 852611 APK [armeabi-v7a] Expires: 23/11/2026 #8526
馃摤 Mergin Maps 852611 APK [armeabi-v7a] Google Play Store #8526
Android Build 馃摤 Mergin Maps 852651 APK [arm64-v8a] Expires: 23/11/2026 #8526
馃摤 Mergin Maps 852651 APK [arm64-v8a] Google Play Store #8526
iOS Build 馃摤 Build number: 26.08.946711 #9467

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Photo naming expression returns NULL value in some cases

1 participant