Bug 320480

Summary: "Maintenance / Merge Duplicates" should be able to sort the found duplicates by pathname
Product: [Applications] kphotoalbum Reporter: Martin Jost <kde>
Component: generalAssignee: KPhotoAlbum Bugs <kphotoalbum-bugs-null>
Status: CONFIRMED ---    
Severity: wishlist CC: johannes, nate
Priority: NOR Keywords: usability
Version First Reported In: 4.4   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Bug Depends on:    
Bug Blocks: 320635    

Description Martin Jost 2013-05-30 12:21:39 UTC
It is not clear, what the current order of the found duplicates is.
It would be nice to have an option to sort this by pathname.
That would ease fining whole stretches of duplicated entries.
Right now, this is difficult.

Reproducible: Always

Steps to Reproduce:
Start "Maintenance / Merge Duplicates" with some duplicated entry in index.xml present 
Actual Results:  
The found duplicates are in no apparent order.

Expected Results:  
An option to sort by pathname.

However I'm not sure, how to handle the fact, that each entry consists of two pathnames for the "original" and "duplicate".
Maybe have two options to order by first or second entry.

 On 29. May 2013 Johannes Zarl <isilmendil@isilme.lupus.uberspace.de> asked in mail thread "Re: [KPhotoAlbum] Maintenance / Merge duplicates" for a Bug tracker entry to keep track of this.
Comment 1 Johannes Zarl-Zierl 2025-10-19 21:34:27 UTC
Git commit 09eac8fd09feb901078ee20f11ccd81b3d0d6d6a by Johannes Zarl-Zierl, on behalf of Randall Rude.
Committed on 19/10/2025 at 21:34.
Pushed by johanneszarl into branch 'master'.

Make sorting predictable in the merge duplicates dialog

The images were presented in DB order.  Now they are sorted by the pathname of the oldest copy of each image.

The order of the radio buttons for the copies is also now sorted by file creation time, so the oldest copy is always first and is selected by default.

A common use case: the user copies files from the camera into KPhotoAlbum but forgets to remove them from the camera, then later copies the same images (along with some new ones) into a new subfolder.  This can now be solved with 2-3 clicks assuming the older copies are kept.

This patch doesn't completely address the bug since there is still no quick way to select all of the newer copies in the example above.

M  +28   -5    MainWindow/DuplicateMerger/DuplicateMerger.cpp

https://invent.kde.org/graphics/kphotoalbum/-/commit/09eac8fd09feb901078ee20f11ccd81b3d0d6d6a