Bug 25019 - Non standard initialization in ViewPolicy filter
Summary: Non standard initialization in ViewPolicy filter
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on: 15870
Blocks:
  Show dependency treegraph
 
Reported: 2020-03-30 12:37 UTC by Tomás Cohen Arazi
Modified: 2020-05-11 21:36 UTC (History)
3 users (show)

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


Attachments
Bug 25019: Make the ViewPolicy filter initialization standard (2.06 KB, patch)
2020-03-30 12:44 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 25019: Make the ViewPolicy filter initialization standard (2.11 KB, patch)
2020-03-31 19:40 UTC, David Nind
Details | Diff | Splinter Review
Bug 25019: Make the ViewPolicy filter initialization standard (2.18 KB, patch)
2020-04-08 07:44 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi 2020-03-30 12:37:06 UTC
The ViewPOlicy filter has its own method for initializing its values, and then using its variables. This should be homogeneous through the filters.
Comment 1 Tomás Cohen Arazi 2020-03-30 12:44:02 UTC
Created attachment 102081 [details] [review]
Bug 25019: Make the ViewPolicy filter initialization standard

This patch makes the ViewPolicy filter use the 'params' accessor instead
of relying of ->{options} which has no accessor. This will allow
interacting with the filter object be similar through all the filters in
the chain.

To test, we just need to verify no behaviour change takes place:
1. Run:
   $ kshell
  k$ prove t/db_dependent/Filter_MARC_ViewPolicy.t
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests still pass!
4. Sign off :-D
Comment 2 David Nind 2020-03-31 19:40:28 UTC
Created attachment 102156 [details] [review]
Bug 25019: Make the ViewPolicy filter initialization standard

This patch makes the ViewPolicy filter use the 'params' accessor instead
of relying of ->{options} which has no accessor. This will allow
interacting with the filter object be similar through all the filters in
the chain.

To test, we just need to verify no behaviour change takes place:
1. Run:
   $ kshell
  k$ prove t/db_dependent/Filter_MARC_ViewPolicy.t
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests still pass!
4. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Jonathan Druart 2020-04-08 07:44:50 UTC
Created attachment 102532 [details] [review]
Bug 25019: Make the ViewPolicy filter initialization standard

This patch makes the ViewPolicy filter use the 'params' accessor instead
of relying of ->{options} which has no accessor. This will allow
interacting with the filter object be similar through all the filters in
the chain.

To test, we just need to verify no behaviour change takes place:
1. Run:
   $ kshell
  k$ prove t/db_dependent/Filter_MARC_ViewPolicy.t
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests still pass!
4. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Martin Renvoize 2020-04-08 10:55:34 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 5 Joy Nelson 2020-05-01 18:59:19 UTC
backported to 19.11.x for 19.11.06
Comment 6 Lucas Gass 2020-05-11 21:36:34 UTC
backported to 19.05.x for 19.05.11