Bug 410657 - Digikam 6.2 bad sorting
Summary: Digikam 6.2 bad sorting
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Albums-Sort (show other bugs)
Version: 6.2.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-06 15:21 UTC by maderios
Modified: 2019-08-08 11:36 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 6.3.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description maderios 2019-08-06 15:21:25 UTC
Files sorting by date or modification is changed after tagging them.
I sort files by creation date or modification date, reverse order, it works.
Then, after tagging some files, i discover these tagged files are sorted
first. I think digikam considers them as "just created" or "just modified"

Digikam 6.2 Archlinux compiled package
Mariadb
Comment 1 Maik Qualmann 2019-08-06 15:43:29 UTC
Please describe in more detail. The problem can not be reproduced here. What files JPEG or RAW, with or without sidecar? Which metadata will be added, keywords, tags or rating? In principle, the creation date in the databse can not be changed by adding tags to the image.

There is an option in the setup for the modification date that it can be retained.

Maik
Comment 2 maderios 2019-08-06 17:48:02 UTC
(In reply to Maik Qualmann from comment #1)
> Please describe in more detail. The problem can not be reproduced here. What
> files JPEG or RAW, with or without sidecar? Which metadata will be added,
> keywords, tags or rating? 

No image quality sorting.
Only png files in concerned folder
Only xmp sidecars, read/write to xmp sidecars, write to xmp sidecars only, no exif tags.
Only Keywords tags
Write image tags to medata (only this option)

>In principle, the creation date in the databse can
> not be changed by adding tags to the image.
> 
> There is an option in the setup for the modification date that it can be
> retained.
Which one?
I tested  options in settings/metadata/behaviour, time stamps, update file timestamps: no change
Comment 3 maderios 2019-08-06 19:34:41 UTC
How to reproduce bug:
Create TEST album
Move some images in TEST album
Sort images by modification date, reverse order
Tag one image with a keyword.
Immediately, this tagged image/thumbnail is sorted first
Then, delete the tag.
This image/thumbnail stays at his last place.
Comment 4 Maik Qualmann 2019-08-06 20:28:46 UTC
Git commit beeb5be51d9a73188d5ba1ee943c7a061c51faee by Maik Qualmann.
Committed on 06/08/2019 at 20:24.
Pushed by mqualmann into branch 'master'.

respect the option "Update file timestamp when files are modified"
when changes are made in sidecars.
If external changes in sidecars are to be detected,
this option must be activated.
A change requires a re-read of the metadata or a
restart to perform the initial scan.
FIXED-IN: 6.3.0

M  +2    -1    NEWS
M  +9    -9    core/libs/database/collection/collectionscanner_scan.cpp
M  +3    -1    core/libs/database/item/scanner/itemscanner.cpp

https://invent.kde.org/kde/digikam/commit/beeb5be51d9a73188d5ba1ee943c7a061c51faee
Comment 5 maderios 2019-08-07 20:03:53 UTC
I rebuilt DK, sorting works normally now, thanks, but i don't understand some things:
> respect the option "Update file timestamp when files are modified"
> when changes are made in sidecars.
I did not find this option in settings, i didn't change anything in settings but, it works...
My digikamrc
[Metadata Settings]
Clear Metadata If Rescan=true
Custom Sidecar Extensions=
EXIF Rotate=false
EXIF Set Orientation=false
Metadata Writing Mode=1
Rescan File If Modified=true
Rotate By Internal Flag=true
Rotate By Metadata Flag=false
Rotate Contents Lossless=true
Rotate Contents Lossy=false
Save Color Label=false
Save Date Time=false
Save EXIF Comments=false
Save FaceTags=false
Save Pick Label=false
Save Rating=false
Save Tags=true
Save Template=false
Update File Timestamp=false
Use Lazy Synchronization=false
Use XMP Sidecar For Reading=true
Write Metadata To RAW Files=false
Write RAW Files=false


> If external changes in sidecars are to be detected,
> this option must be activated.
> A change requires a re-read of the metadata or a
> restart to perform the initial scan.
Comment 6 Maik Qualmann 2019-08-07 20:21:47 UTC
The option "Update file timestamp when files are modified" can be found in the metadata settings. The text changed a bit yesterday and is now: "Update file modification timestamp when files are modified"

It is quite normal, if you change a file, that then the file modification date contains the current date. The sorting would change so constantly. So you can disable this update, digiKam changes it back to the previous date after each file change. This is basically bad for backup programs they may not recognize that the file has changed (read the What's Help).

Since the last version, we also monitor the modification date of sidecar to respond to external changes. Now only if the upper option is activated. I hope I've described something understandable...

Maik
Comment 7 maderios 2019-08-08 11:36:02 UTC
From what i see,now, i have to use these settings to avoid sorting/modification date change after tagging:
In Metada settings:
'Timestamps'= No
'Update file modification timestamp when files are modified'= No
I hope it doesn't change anything for backups. I use Osync (Rsync based) to synchronize computers.
I noticed that if these two settings are "yes" (not my case), new tagged files are considered as new files or modified files.


-- Greetings

Maderios