Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Group order reset after adding a new group #10017

Closed
2 tasks done
Siedlerchr opened this issue Jun 18, 2023 · 8 comments · Fixed by #10066
Closed
2 tasks done

Group order reset after adding a new group #10017

Siedlerchr opened this issue Jun 18, 2023 · 8 comments · Fixed by #10066
Assignees
Labels
bug Confirmed bugs or reports that are very likely to be bugs groups

Comments

@Siedlerchr
Copy link
Member

Siedlerchr commented Jun 18, 2023

JabRef version

Latest development branch build (please note build date below)

Operating system

macOS

Details on version and operating system

mac os ventura

Checked with the latest development build

  • I made a backup of my libraries before testing the latest development version.
  • I have tested the latest development version and the problem persists

Steps to reproduce the behaviour

  1. Create a library
  2. Add groups A, B, C
  3. arrange groups to C, A, B
  4. Add a new group D
  5. The groups are now back in A, B, C, D order

=> Expected order would be C, A, B, D

It seems to be that the default sort ordering A-Z is applied,
originally reported in the forum https://discourse.jabref.org/t/adding-new-group-changes-the-group-order-back-to-alphabetical-order/3855?u=siedlerchr

Appendix

...

Log File
Paste an excerpt of your log file here
@Siedlerchr Siedlerchr added groups bug Confirmed bugs or reports that are very likely to be bugs labels Jun 18, 2023
@aqurilla
Copy link
Contributor

aqurilla commented Jul 4, 2023

Hi! I would like to take up this issue

@aqurilla
Copy link
Contributor

aqurilla commented Jul 4, 2023

For fixing this do we just remove the sortAlphabeticallyRecursive call here -

sortAlphabeticallyRecursive(parent.getGroupNode());
dialogService.notify(Localization.lang("Added group \"%0\".", group.getName()));
writeGroupChangesToMetaData();

I wonder if maintaining the alphabetical order is a desirable feature for some users?

@Siedlerchr
Copy link
Member Author

Siedlerchr commented Jul 4, 2023 via email

@aqurilla
Copy link
Contributor

aqurilla commented Jul 4, 2023

Got it, thanks

@Siedlerchr
Copy link
Member Author

So yeah just remove this for default on group adding and and leave it to the user in the context menu

@aqurilla
Copy link
Contributor

aqurilla commented Jul 4, 2023

Default sorting also occurs when major edit modifications are carried out on a group. I am guessing that should also be removed, so as to have consistent behaviour?

@Siedlerchr
Copy link
Member Author

Siedlerchr commented Jul 5, 2023 via email

@koppor
Copy link
Member

koppor commented Jul 11, 2023

Note that the behavior was introduced at a fix for koppor#577 at #9228. The PR, however, missed the requirement that groups should be added alphabetically only if they were sorted alphabetically before. -- Thinking longer, the requirement was not that good. We came up with a more sophisticated requirement at koppor#577.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs groups
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants