Bug 306158

Summary: GROUP : Sorting the image-groups by name in main image view, when the images are grouped in albums.
Product: [Applications] digikam Reporter: Andrey <senjas>
Component: Albums-ItemGroupAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: caulier.gilles, mohammed.ahmed.anwer, smit.meh
Priority: NOR    
Version: 2.8.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 4.3.0
Sentry Crash Report:

Description Andrey 2012-09-02 13:41:47 UTC
Descending Image Sorting order doesn't work if Images are grouped by Album. The order only changes inside of Albums (Folders), but Albums (Folders) themselves are always sorted in Ascending order.

Reproducible: Always

Steps to Reproduce:
Choose:
1.View -> Sort Images -> By Path
2.View -> Image Sorting Order -> Descending
3.View -> Group Images -> By Album
4.Create three folders and put some pictures inside of them:
Folder2001
Folder2002
Folder2003

Actual Results:  
Folder2001 is always on top, no matter what sorting order is chosen. So, when descending or ascending sorting order is chosen, folders are sorted in this way always:
Folder2001
Folder2002
Folder2003

Expected Results:  
When descending sorting order is chosen, folders (Albums) with image thumbnails should be sorted in this way:
Folder2003
Folder2002
Folder2001


Use case:

I organize all of my images by dates, so every folder (which becomes Albums in digikam) with images is named as a date (or range of dates), e.g.:
2012.06.06-Sunset_on_a_beach
2012.01.05-Brothers_birthday
2012.01.01-New_Year_Celebration

When I open digikam I expect the newest images and newest folders to be on top, not on the bottom. So I choose Descending order. But it doesn't affect the way Albums (Folders) are sorted.
Comment 1 Smit Mehta 2012-09-02 15:04:27 UTC
Hi Andrey

Just to confirm, are you expecting a descending order in the tree of albums, in the pane which is on the left? Or in main view area where all the pics are shown, and you want the pics to be grouped album wise, where album should appear in a descending order?

Smit
Comment 2 Andrey 2012-09-02 15:33:37 UTC
I mean the latter: main view area with the thumbnails of the pictures grouped album wise. There seems to be no way to change it, other that choosing Descending order (which actually doesn't change the order of Albums).

Tree of albums has its own order, which changes by clicking on "My Albums" label. I think that's quite convenient and works exactly as it should.
Comment 3 Smit Mehta 2012-09-02 16:02:09 UTC
Andrey

Correct. I suspected so. But the current implementation is about sorting the images only, and not about sorting the image-groups (albums, tags). These functions just sort the images on the basis of their name, etc. internally within the albums, and not the albums themselves. But yes, it could be a nice feature if we wanted to do that. I will change the bug-definition to wish list, and slightly modify the bug-summary.

Smit
Comment 4 Andrey 2012-09-02 16:34:37 UTC
Hi Smit,

That was my original thought. But using other settings Image-groups sorting does change.

I have created 3 albums to test it:
2001
2002
2003
Using "Edit Albums" I have set the year to each folder (2001 to 2001 and so on, by default all folders have the same date, so this test won't work).

These settings...
1.View -> Sort Images -> By Date
2.View -> Image Sorting Order -> Descending
3.View -> Group Images -> By Album
...produce this order:
2003
2002
2001

These settings...
1.View -> Sort Images -> By Date
2.View -> Image Sorting Order -> Ascending
3.View -> Group Images -> By Album
...produce this order:
2001
2002
2003

As, you see, current behavior seems inconsistent: 
if you use Sort Images -> By Date, order of albums does change, 
but if you use Sort Images -> By Name, order of Albums doe not change.

This made me think that it is a bug. I have tried to find similar bug reports and stumbled upon some comments about removed menu entries considering sorting of Albums (there is no way to sort them now), so that might be related to this bug/inconsistency.
Comment 5 Marcel Wiesweg 2012-09-02 16:42:16 UTC
I cant right now explain the phenomenon described in #4, regarding the original bug: There a method 
setCategorizationSortOrder in ImageSortSettings which implements the requested setting, but it's not used from the UI, so the default order should always apply, which is ascending.
Comment 6 Smit Mehta 2012-09-02 17:42:52 UTC
@Andrey, Yes, I confirm this inconsistency. We will look into it and see what we can do. Thanks for your replies.
@Marcel Should we include another UI option to handle this?
Comment 7 Marcel Wiesweg 2012-09-03 17:18:47 UTC
This was intentionally omitted from the UI, some things are just too much. May be we can set the same sort order as for the images.
Comment 8 Andrey 2013-03-30 20:30:55 UTC
Any updates on this issue? 

I tried digikam 3.1.0, I still observe the same behavior:

If I choose sorting by path, then Albums with previews are sorted Ascending,
not matter what the settings are.

If I choose sorting by name, then Albums with previews are shown according
to Ascending/Descending setting in View - Image Sorting Order.
Comment 9 Mohamed 2013-05-08 16:44:00 UTC
Andrey ,
I am working on it currently.