Skip to content

Fix photo naming expression returning NULL - #4671

Merged
Withalion merged 2 commits into
masterfrom
bugfix/naming-expression-returning-NULL
Oct 21, 2026
Merged

Withalion merged 2 commits into
masterfrom
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

github-actions Bot commented Aug 25, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 37584573024

Warning

No base build found for commit 36307a9 on bugfix/fix-reuse-last-entered-value.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 59.824%

Details

  • Patch coverage: No coverable lines changed in this PR.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 15773
Covered Lines: 9436
Line Coverage: 59.82%
Coverage Strength: 97.01 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

Comment thread app/attributes/attributecontroller.cpp Outdated
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

📦 Build Artifacts Ready

OS Status Build Info Workflow run
macOS Build 📬 Mergin Maps 72701 dmg Expires: 07/12/2026 #7270
linux Build 📬 Mergin Maps 72961 x86_64 Expires: 07/12/2026 #7296
win64 Build 📬 Mergin Maps 64721 win64 Expires: 07/12/2026 #6472
Android Build 📬 Mergin Maps 858011 APK [armeabi-v7a] Expires: 07/12/2026 #8580
📬 Mergin Maps 858011 APK [armeabi-v7a] Google Play Store #8580
Android Build 📬 Mergin Maps 858051 APK [arm64-v8a] Expires: 07/12/2026 #8580
📬 Mergin Maps 858051 APK [arm64-v8a] Google Play Store #8580
iOS Build ❌ Build failed or not found. #9522

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

📦 Build Artifacts Ready

OS Status Build Info Workflow run
macOS Build 📬 Mergin Maps 72771 dmg Expires: 08/12/2026 #7277
linux Build 📬 Mergin Maps 73031 x86_64 Expires: 08/12/2026 #7303
win64 Build 📬 Mergin Maps 64791 win64 Expires: 08/12/2026 #6479
Android Build 📬 Mergin Maps 858751 APK [arm64-v8a] Expires: 08/12/2026 #8587
📬 QR code Google Play Store #8587
Android Build 📬 Mergin Maps 858711 APK [armeabi-v7a] Expires: 08/12/2026 #8587
📬 QR code Google Play Store #8587
iOS Build 📬 Build number: 26.09.952911 #9529

@Withalion

Copy link
Copy Markdown
Collaborator

@xkello can you fix the history and conflicts here? I'll merge afterwards

@xkello
xkello force-pushed the bugfix/naming-expression-returning-NULL branch 2 times, most recently from 0388c4f to 889c64d Compare September 23, 2026 13:01
@xkello

xkello commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

@xkello can you fix the history and conflicts here? I'll merge afterwards

@Withalion guess its done?

@xkello
xkello force-pushed the bugfix/naming-expression-returning-NULL branch from 889c64d to 9a47b57 Compare September 23, 2026 13:13
@github-actions

Copy link
Copy Markdown

📦 Build Artifacts Ready

OS Status Build Info Workflow run
macOS Build 📬 Mergin Maps 73221 dmg Expires: 22/12/2026 #7322
linux Build 📬 Mergin Maps 73481 x86_64 Expires: 22/12/2026 #7348
win64 Build 📬 Mergin Maps 65241 win64 Expires: 22/12/2026 #6524
Android Build 📬 Mergin Maps 863451 APK [arm64-v8a] Expires: 22/12/2026 #8634
📬 QR code Google Play Store #8634
Android Build 📬 Mergin Maps 863411 APK [armeabi-v7a] Expires: 22/12/2026 #8634
📬 QR code Google Play Store #8634
iOS Build 📬 Build number: 26.09.957411 #9574

@xkello
xkello force-pushed the bugfix/naming-expression-returning-NULL branch from 9a47b57 to 80ecd82 Compare October 7, 2026 06:59
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

📦 Build Artifacts Ready

OS Status Build Info Workflow run
macOS Build 📬 Mergin Maps 73911 dmg Expires: 05/01/2027 #7391
linux Build 📬 Mergin Maps 74171 x86_64 Expires: 05/01/2027 #7417
win64 Build 📬 Mergin Maps 65931 win64 Expires: 05/01/2027 #6593
Android Build 📬 Mergin Maps 870351 APK [arm64-v8a] Expires: 05/01/2027 #8703
📬 QR code Google Play Store #8703
Android Build 📬 Mergin Maps 870311 APK [armeabi-v7a] Expires: 05/01/2027 #8703
📬 QR code Google Play Store #8703
iOS Build 📬 Build number: 26.10.964311 #9643

@Withalion
Withalion force-pushed the bugfix/naming-expression-returning-NULL branch from 80ecd82 to 397ea36 Compare October 21, 2026 11:29
Base automatically changed from bugfix/fix-reuse-last-entered-value to master October 21, 2026 11:30
@Withalion
Withalion force-pushed the bugfix/naming-expression-returning-NULL branch from 397ea36 to ef1e77a Compare October 21, 2026 11:30
@Withalion
Withalion merged commit fc1af6a into master Oct 21, 2026
7 checks passed
@Withalion
Withalion deleted the bugfix/naming-expression-returning-NULL branch October 21, 2026 11:31
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

2 participants