Summary: | Koha::AuthorisedValues - Remove C4::Koha::IsAuthorisedValueCategory | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Architecture, internals, and plumbing | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | brendan, hector.hecaxmmx, kyle |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Bug Depends on: | 15769, 15783 | ||
Bug Blocks: | 15799 | ||
Attachments: |
Bug 15800: Koha::AuthorisedValues - Remove C4::Koha::IsAuthorisedValueCategory
[SIGNED-OFF]Bug 15800: Koha::AuthorisedValues - Remove C4::Koha::IsAuthorisedValueCategory Bug 15800: Koha::AuthorisedValues - Remove C4::Koha::IsAuthorisedValueCategory Bug 15800: Koha::AuthorisedValues - Remove C4::Koha::IsAuthorisedValueCategory |
Description
Jonathan Druart
2016-02-11 14:13:01 UTC
Created attachment 47899 [details] [review] Bug 15800: Koha::AuthorisedValues - Remove C4::Koha::IsAuthorisedValueCategory C4::Koha::IsAuthorisedValueCategory contains only 2 useful calls, from C4::Reports::Guided and reports/guided_reports.pl It can be replaced with Koha::AuthorisedValues->search({ category => $authorised_value})->count Test plan: 1/ Create a sql report using an authorised value category, something like: SELECT COUNT(*) FROM items where lost=<<lost|LOST>> 2/ Execute the report and confirm that everything works fine. 3/ Create a sql report using a nonexistent authorised value categor, something like: SELECT COUNT(*) FROM items where lost=<<lost|NONEXIST>> 4/ When saving the report, you should get a warning message "lost: The authorized value category (NONEXIST) you selected does not exist." 5/ Save anyway and execute the report, you should get the same warning message. QA: git grep IsAuthorisedValueCategory should not return any results prove t/db_dependent/ReportsGuided.t should return green Created attachment 47926 [details] [review] [SIGNED-OFF]Bug 15800: Koha::AuthorisedValues - Remove C4::Koha::IsAuthorisedValueCategory C4::Koha::IsAuthorisedValueCategory contains only 2 useful calls, from C4::Reports::Guided and reports/guided_reports.pl It can be replaced with Koha::AuthorisedValues->search({ category => $authorised_value})->count Test plan: 1/ Create a sql report using an authorised value category, something like: SELECT COUNT(*) FROM items where itemlost=<<lost|LOST>> 2/ Execute the report and confirm that everything works fine. 3/ Create a sql report using a nonexistent authorised value categor, something like: SELECT COUNT(*) FROM items where itemlost=<<lost|NONEXIST>> 4/ When saving the report, you should get a warning message "lost: The authorized value category (NONEXIST) you selected does not exist." 5/ Save anyway and execute the report, you should get the same warning message. QA: git grep IsAuthorisedValueCategory should not return any results prove t/db_dependent/ReportsGuided.t should return green Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as described Created attachment 48023 [details] [review] Bug 15800: Koha::AuthorisedValues - Remove C4::Koha::IsAuthorisedValueCategory C4::Koha::IsAuthorisedValueCategory contains only 2 useful calls, from C4::Reports::Guided and reports/guided_reports.pl It can be replaced with Koha::AuthorisedValues->search({ category => $authorised_value})->count Test plan: 1/ Create a sql report using an authorised value category, something like: SELECT COUNT(*) FROM items where itemlost=<<lost|LOST>> 2/ Execute the report and confirm that everything works fine. 3/ Create a sql report using a nonexistent authorised value categor, something like: SELECT COUNT(*) FROM items where itemlost=<<lost|NONEXIST>> 4/ When saving the report, you should get a warning message "lost: The authorized value category (NONEXIST) you selected does not exist." 5/ Save anyway and execute the report, you should get the same warning message. QA: git grep IsAuthorisedValueCategory should not return any results prove t/db_dependent/ReportsGuided.t should return green Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as described Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Didn't Apply for me - Didn't take a look at why at this point. (I'll leave an @later for khall) Patch no longer applies, please rebase and reset to "Passed QA". Thanks! Created attachment 48443 [details] [review] Bug 15800: Koha::AuthorisedValues - Remove C4::Koha::IsAuthorisedValueCategory C4::Koha::IsAuthorisedValueCategory contains only 2 useful calls, from C4::Reports::Guided and reports/guided_reports.pl It can be replaced with Koha::AuthorisedValues->search({ category => $authorised_value})->count Test plan: 1/ Create a sql report using an authorised value category, something like: SELECT COUNT(*) FROM items where itemlost=<<lost|LOST>> 2/ Execute the report and confirm that everything works fine. 3/ Create a sql report using a nonexistent authorised value categor, something like: SELECT COUNT(*) FROM items where itemlost=<<lost|NONEXIST>> 4/ When saving the report, you should get a warning message "lost: The authorized value category (NONEXIST) you selected does not exist." 5/ Save anyway and execute the report, you should get the same warning message. QA: git grep IsAuthorisedValueCategory should not return any results prove t/db_dependent/ReportsGuided.t should return green Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as described Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Pushed to Master - Should be in the May 2016 Release. Thanks! |