Bug 422078 - Album creation date is modification date of the folder
Summary: Album creation date is modification date of the folder
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Albums-ItemGroup (show other bugs)
Version: 7.0.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-26 05:12 UTC by Marcel
Modified: 2020-07-25 06:48 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.1.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel 2020-05-26 05:12:37 UTC
SUMMARY
If on the disk a new image folder is created, this folder gets scanned by digikam and results in a new album. The new album gets automatically the modification date of the folder. 

In my opinion this is not always the excepted behaviour. Users may use different tools for modifications or just reorder some pictures, so Digikam takes a wrong date. 

STEPS TO REPRODUCE
1. Take an old picture and put it into a new folder (modification date is now)
2. rescan items (or restart Digikam)

OBSERVED RESULT
The new albums date is set to today

EXPECTED RESULT
Unsure what I would expect, but this is not correct. Following a better solution:
- Folder creation date (also error prune)
- Newest creation date of pictures in that folder

SOFTWARE/OS VERSIONS
digikam-7.0.0-rc-20200522T135520-x86-64.appimage
Linux/KDE Plasma: Ubuntu

ADDITIONAL INFORMATION
Comment 1 Maik Qualmann 2020-05-26 05:43:39 UTC
Hi Marcel,

if you want to deal with the problem, we also have this bug report: bug 405690

The album date in the database can be != with the modification date of the folder. In fact, I am pretty sure that we do not intentionally change the folder modification date anywhere.

Maik
Comment 2 Marcel 2020-05-26 10:20:00 UTC
Probably the description is not clear enough. Lets say I have a folder 2010 with all my pictures from 2010 and then I rename this folder to "2010_renamed". The modification date of that folder will change to now and digikam will add the album "2010_renamed" with the date from now. For me this is pretty ugly as all containing pictures were taken in 2010. Especially sorting the albums according to their date is impossible without fixing all wrong dates manually.
Comment 3 caulier.gilles 2020-05-26 11:36:22 UTC
Marcel,

Maik send me a private mail today about your possible collaboration as developer.

You are welcome of course. Let's me hear if you need guidance in code and development infrastructure, as digiKam is a huge program...

My best regards

Gilles Caulier
Comment 4 Marcel 2020-05-28 12:12:47 UTC
Thank you Gilles for your detailed answers. I personally see 2 possible ways. 
1. Set the date of all new albums to to the newest creation date of its content. 
2. Add a maintenance tool that updates the selected albums date based of a choice like newest creation date, oldest creation date, modification date of folder.

In my opinion although its the more risky way, I would go for way 1 because I personally don't see a reasonable demand for the current implementation. When loosing the database of Digikam and starting with a new one will not end up in the same album date as before, because we are not in charge of what modification date the operation systems sets to its folders. I personally try to keep metadata of pictures as much as possible in sync with the database of Digikam.
Comment 6 Maik Qualmann 2020-07-25 06:48:00 UTC
Merged:

https://invent.kde.org/graphics/digikam/-/merge_requests/29

Maik