Keepassxc: Enable custom entry sort order within a group

Created on 13 Sep 2018  Â·  16Comments  Â·  Source: keepassxreboot/keepassxc


The entries within a group should be sortable by the user

Expected Behavior



Behaviour like within keepass (the user can change the position of each entry within the sequence of a group)

Current Behavior



Only alphabetic sorting

Debug Info


KeePassXC - Version 2.3.4
Revision: 2cc52a8
Distribution: Snap

Libraries:

Qt 5.9.5
libgcrypt 1.8.1

Operating system: Ubuntu Core 18
CPU architecture: x86_64
Kernel: linux 4.15.0-34-generic

Enabled extensions:

Auto-Type
Browser Integration
Legacy Browser Integration (KeePassHTTP)
SSH Agent
YubiKey

new feature

Most helpful comment

The functionality is implemented. I still have to write some tests. If someone want's to have a look, before I issue a pull request: https://github.com/hmb/keepassxc/tree/feature/native-sortorder
I'm open for suggestions, it's my first QT project ;-)

All 16 comments

What is the purpose? This adds a lot of complexity with very minimal gain. If finding an entry is an issue, that's what search is for.

I agree with this request. I actually came here to see if somebody already filed this as request or if it was in progress.

This is my main gripe with KeepassXC and why I would otherwise keep using Keepass instead. I like to have the ability to manually sort the entries in my groups. I don't see any other way to effectively sort entries in a custom way. One could rename the entries with numbers prefixed, but this is very ugly and you can't change the order easily with up/down. It should not be that hard to do depending on how the implementation was done.

It's not about finding things, it's about organizing things the way I want. Just because some people see no value does not mean that this is the case for everyone. It's an interesting coincidence that I find someone else posting this just a few hours before I went to check for this feature.

I completely agree with kevin-stuart's explanation / rationale of that proposal.

In reality I think this is pretty easy if you save the drag-drop order in the entry XML tree directly (like KeePass does).
Entries order in the database is custom by default, KeePassXC simply sort them on display. If we don't sort them and enable drag-n-drop this should work out of the box

Hey there. I use KeePassXC and the web integration on a daily base and absolutely love it!

My current workflow is to create a group per system/customer/project etc. and add all important credentials there (See the example screenshot). This works, but sadly [alphanumerical] group auto-sorting is not supported at the moment. So a new system like 192.168.1.21 is appended after 192.168.1.32 and not 192.168.1.20. I would like to introduce KeePassXC at work and manage several dozen of systems & even more customers credentials, but the lack of group sorting prevents this.

I would love to sponsor this feature with for example 50/100 USD to the project and/or author - or buy some coffee/wish list items. etc. Just beeing able to give something back to this great piece of software :)

capture

Contributors: Why not add a hidden numerical column, and "custom sort" to be against said column?

The issue is not that this can't be done, its the the gui doesn't allow it at this time

Just to be perfectly clear: is it complicated to add a numerical value to the DB _and_ the list view, and then sort against that?
Or the original concept of the feature (whichever it was) is not able to be done?

In mono-KeePass, I sort them by using explicit menu actions (with a shortcut) rather than mouse-drag-and-drop (I never [knew it was possible/tried] with the mouse).

The order of entries when you first open a database in KeePass2 is how they are stored in the XML of the database. By default, KeePassXC sorts by title ascending. The keyboard shortcut in KeePass2 (ALT+UP/ALT+DOWN) is a quick and dirty way to handle this custom ordering. I prefer drag/drop, but we could also support the keyboard shortcuts.

When clicking on the column headers in KeePass2 there are three states: Manual Order, Order Ascending, Order Descending. We would also have to support this configuration. Note that when sorting by header in KeePass2, you cannot change the order of entries manually.

There must be reasons why "storage sorting" is not doable with KeePassXC. However, using a custom field for this feature does not sound too bad - especially since an average database will not put any code under any performance issues.

If the implementation specifics sounds like a "hack", "bad idea" or anything of the sorts, it's up to the maintainers. If the idea sounds low priority, it's a different topic.

We are talking past each other. KeePass2 and KeePassXC both save entries in "natural" order. The sorting is done programmatically and not saved. KeePassXC just doesn't allow you to show the "natural" order like KeePass2 can. That is what needs to be implemented/changed.

Adding an additional field is not the correct answer to this problem.

I use the original KeePass for more than 1K Passwords filed in a complex hierachial group structure. The custom sorting is one of the features I use most. I sort my passwords in order of importance which does not coincide with an alphabetical order. So sorting the entries messes up my system in a way that it is actually a showstopper to use KeepassXC.
Is the sorting done programmatically (custom code) or is it just a flag in the QT list widget? In any case it should be not to complicated to just not sort the entries and display them in the order found in the xml file. Of course some mechanism to reorder entries is then needed as well. But as reordering occurs only rarely a simple mechanism like a menu or keyboard shortcuts should suffice.
If it's more than a small change to implement I could try to schedule some of my time to provide a patch. Unfortunately I've had bad experience with some open source projects, that did not apreciate patches for more or less political reasons. Which is fine, it's their project but I'd rather use my time on something that's getting used in the end. So if there's a good chance that this feature will be used I'd be happy to give it a go. If it's not - no offence - but then I'd rather stick with the original KeePass.

You can absolutely give it a go. The drag/drop reorder might be challenging but not impossible. A keyboard shortcut like Ctrl+Up/Down would be great. I believe the header sort clicking needs to be tri-state as well (sort up, sort down, sort as provided to the model)

https://doc.qt.io/qt-5/qheaderview.html#setSortIndicator

Ok, looks feasable. I'll have a start with the keyboard/menu solution.

The functionality is implemented. I still have to write some tests. If someone want's to have a look, before I issue a pull request: https://github.com/hmb/keepassxc/tree/feature/native-sortorder
I'm open for suggestions, it's my first QT project ;-)

Was this page helpful?
0 / 5 - 0 ratings