Bug 33063 - Duplicated reports should maintain subgroup of original
Summary: Duplicated reports should maintain subgroup of original
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Katrin Fischer
QA Contact: Lucas Gass (lukeg)
URL:
Keywords:
: 33062 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-02-24 14:32 UTC by Andrew Fuerste-Henry
Modified: 2024-12-23 08:06 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.04,22.05.12,21.11.20
Circulation function:


Attachments
Bug 33063: Make sure correct subgroup is pre-selected when duplicating reports (2.31 KB, patch)
2023-02-27 23:50 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 33063: Make sure correct subgroup is pre-selected when duplicating reports (2.38 KB, patch)
2023-03-07 10:56 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 33063: Make sure correct subgroup is pre-selected when duplicating reports (2.43 KB, patch)
2023-03-08 15:02 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2023-02-24 14:32:25 UTC
When one duplicates a report that's in a group, the new report defaults to going into the same group as the original. But if the original report also has a subgroup that is not passed on to the duplicate. A duplicated report should default to the same group *and* subgroup as its original.
Comment 1 Katrin Fischer 2023-02-27 23:50:59 UTC
Created attachment 147475 [details] [review]
Bug 33063: Make sure correct subgroup is pre-selected when duplicating reports

When the 'Duplicate' option for reports was used, the all options
would be copied correctly to the new report, but the report sub group.

In this case the templates were created correctly, but the JavaScript
to create the correct pull downs for each group, overwrote the
the selection.

To test:
* Create a some reports with different groups and subgroups and without
* 'Duplicate' your reports and verify that the sub group will always stay empty
* Apply patch
* Verify the correct sub group is now always selected
* Edit/Add some reports to make sure the group/subgroup controls still
  work as expected
Comment 2 Katrin Fischer 2023-02-27 23:54:28 UTC
*** Bug 33062 has been marked as a duplicate of this bug. ***
Comment 3 PTFS Europe Sandboxes 2023-03-07 10:56:51 UTC
Created attachment 147819 [details] [review]
Bug 33063: Make sure correct subgroup is pre-selected when duplicating reports

When the 'Duplicate' option for reports was used, the all options
would be copied correctly to the new report, but the report sub group.

In this case the templates were created correctly, but the JavaScript
to create the correct pull downs for each group, overwrote the
the selection.

To test:
* Create a some reports with different groups and subgroups and without
* 'Duplicate' your reports and verify that the sub group will always stay empty
* Apply patch
* Verify the correct sub group is now always selected
* Edit/Add some reports to make sure the group/subgroup controls still
  work as expected

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Comment 4 Sally 2023-03-07 10:57:17 UTC
Works as described, thanks for the patch.
Comment 5 Katrin Fischer 2023-03-07 11:36:17 UTC
(In reply to Sally from comment #4)
> Works as described, thanks for the patch.

Thx for testing :)
Comment 6 Lucas Gass (lukeg) 2023-03-08 15:01:55 UTC
Changes look good, QA script is happy. PQA.
Comment 7 Lucas Gass (lukeg) 2023-03-08 15:02:44 UTC
Created attachment 147961 [details] [review]
Bug 33063: Make sure correct subgroup is pre-selected when duplicating reports

When the 'Duplicate' option for reports was used, the all options
would be copied correctly to the new report, but the report sub group.

In this case the templates were created correctly, but the JavaScript
to create the correct pull downs for each group, overwrote the
the selection.

To test:
* Create a some reports with different groups and subgroups and without
* 'Duplicate' your reports and verify that the sub group will always stay empty
* Apply patch
* Verify the correct sub group is now always selected
* Edit/Add some reports to make sure the group/subgroup controls still
  work as expected

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 8 Tomás Cohen Arazi (tcohen) 2023-03-10 14:15:09 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 9 Matt Blenkinsop 2023-03-10 16:37:27 UTC
Nice work everyone!

Pushed to stable for 22.11.x
Comment 10 Lucas Gass (lukeg) 2023-04-14 16:30:27 UTC
Backported to 22.05.x for upcoming 22.05.12
Comment 11 Arthur Suzuki 2023-04-20 08:41:21 UTC
applied to 21.11.x for 21.11.20
Comment 12 Wainui Witika-Park 2023-04-27 05:56:35 UTC
Not backported to 21.05.x