Bug 22278 - Newly created report group is not selected after saving an SQL report
Summary: Newly created report group is not selected after saving an SQL report
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Nick Clemens
QA Contact: Testopia
URL:
Keywords:
Depends on: 19957
Blocks:
  Show dependency treegraph
 
Reported: 2019-02-05 18:53 UTC by Christopher Brannon
Modified: 2019-02-15 07:06 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 22278: Clear cache when creating new report groups or subgroups (3.14 KB, patch)
2019-02-06 12:50 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 22278: Clear cache when creating new report groups or subgroups (3.19 KB, patch)
2019-02-07 17:55 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 22278: Clear cache when creating new report groups or subgroups (3.24 KB, patch)
2019-02-07 19:00 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Brannon 2019-02-05 18:53:21 UTC
You can fill in the code and name, but when you save the report, nothing is created.
Comment 1 Christopher Brannon 2019-02-05 18:56:42 UTC
Correction: the group is created, but not linked when you save the report.  You have to refresh to even see the group, then select and save the report again.
Comment 2 Katrin Fischer 2019-02-06 06:00:36 UTC
I think the issue might be with the new "save and continue" feature. 

0) Start a new report
1) Pick create for the group
2) Enter code and value
3) Save
4) You remain on the page and value and code are now empty (ok)
5) BUT: The pull down for the group remains "None" instead of reflecting
   the new group
6) Save again - group was created, but lost on the report
Comment 3 Nick Clemens 2019-02-06 12:50:28 UTC
Created attachment 84813 [details] [review]
Bug 22278: Clear cache when creating new report groups or subgroups

When a user adds a new group we create it, then fetch the groups from the cache. However, we aren't clearing the cache on creation. This patch fixes that

To test:
 0) Start a new report
 1) Pick create for the group
 2) Enter code and value
 3) Save
 4) You remain on the page and value and code are now empty (ok)
 5) BUT: The pull down for the group remains "None" instead of reflecting
    the new group
 6) Open a new tab and browse to reports - note the group exists and the report is in it
 7) On original tab save report again, the group was not selected so is lost
 8) Apply patch
 9) Retest with a new report
10) Group is created, saved, and selected upon save
11) Subsequent edits include the new group
12) Test with subgroups as well
Comment 4 Liz Rea 2019-02-07 17:55:19 UTC
Created attachment 84855 [details] [review]
Bug 22278: Clear cache when creating new report groups or subgroups

When a user adds a new group we create it, then fetch the groups from the cache. However, we aren't clearing the cache on creation. This patch fixes that

To test:
 0) Start a new report
 1) Pick create for the group
 2) Enter code and value
 3) Save
 4) You remain on the page and value and code are now empty (ok)
 5) BUT: The pull down for the group remains "None" instead of reflecting
    the new group
 6) Open a new tab and browse to reports - note the group exists and the report is in it
 7) On original tab save report again, the group was not selected so is lost
 8) Apply patch
 9) Retest with a new report
10) Group is created, saved, and selected upon save
11) Subsequent edits include the new group
12) Test with subgroups as well

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Comment 5 Katrin Fischer 2019-02-07 19:00:57 UTC
Created attachment 84858 [details] [review]
Bug 22278: Clear cache when creating new report groups or subgroups

When a user adds a new group we create it, then fetch the groups from the cache. However, we aren't clearing the cache on creation. This patch fixes that

To test:
 0) Start a new report
 1) Pick create for the group
 2) Enter code and value
 3) Save
 4) You remain on the page and value and code are now empty (ok)
 5) BUT: The pull down for the group remains "None" instead of reflecting
    the new group
 6) Open a new tab and browse to reports - note the group exists and the report is in it
 7) On original tab save report again, the group was not selected so is lost
 8) Apply patch
 9) Retest with a new report
10) Group is created, saved, and selected upon save
11) Subsequent edits include the new group
12) Test with subgroups as well

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Katrin Fischer 2019-02-09 08:56:00 UTC
Sorry, Nick!
Comment 7 Nick Clemens 2019-02-11 18:43:30 UTC
Awesome work all!

Pushed to master for 19.05
Comment 8 Martin Renvoize 2019-02-12 12:53:45 UTC
Pushed to 18.11.x for 18.11.03
Comment 9 Lucas Gass 2019-02-12 22:23:31 UTC
backported to 18.05.x for 18.05.09
Comment 10 Fridolin SOMERS 2019-02-15 07:06:33 UTC
Depends on Bug 19957 not in 17.11.x