jabref icon indicating copy to clipboard operation
jabref copied to clipboard

Check group type before showing dialog in edit group

Open LIM0000 opened this issue 3 years ago • 2 comments

Previous discussion about when changing a group color, no dialog should appear #8189

Expected behavior: No dialog appears, just the group color should change

Proposed solution

Fixes #8189 Create 2 functions compareGroupType() and compareGroupFields() in GroupTreeViewModel.java to compare

  1. both oldGroup and newGroup group types
  2. groups' fields/properties between oldGroup and newGroup

Warning dialog only appears:

  • user changes group type (change Collect by)
  • user modifies any field/property that corresponds to Collect by

Warning dialog does not appear if user modifies:

  • [ ] user changing the name of a group using explicit selection. --> could be fixed in a follow up pull-request
  • [x] Description
  • [x] Icon
  • [x] Color
  • [x] Hierarchical context

PR checklist:

  • [ ] Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • [ ] Tests created for changes (if applicable)
  • [x] Manually tested changed features in running JabRef (always required)
  • [ ] Screenshots added in PR description (for UI changes)
  • [ ] Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • [ ] Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

LIM0000 avatar Jun 19 '22 07:06 LIM0000

@LIM0000 Thank you for your ongoing work.

We are a project aiming to train software engineering skills. In the concrete PR, we miss test cases. Could you please add test cases for the view model to check the new functionality?

Would it be possible to add an entry to CHANGELOG.md?

koppor avatar Jul 11 '22 19:07 koppor

:+1:

ThiloteE avatar Sep 04 '22 16:09 ThiloteE

I merge now.

Siedlerchr avatar Oct 10 '22 08:10 Siedlerchr