Description
Radek Šiman (R-Bit Technology, s.r.o.)
2016-10-24 14:52:14 UTC
+1 Created attachment 56805 [details] [review] Added warning about age being of-of-limits Test plan: 1) Apply patch 2) Create a patron and assign him a category having age limits set 3) Change patron's age to be older/younger than category's limits 4) At "Check out" and "Details" tabs you should see a warning with a button allowing to change the category 5) Set a valid category according to patron's age 6) Warning should disappear 7) Perform similar test again, but instead of changing the age change the limits of a category Created attachment 56806 [details] [review] Removed a line setting 'flagged' template parameter by mistake Test plan: 1) Apply patch 2) Create a patron and assign him a category having age limits set 3) Change patron's age to be older/younger than category's limits 4) At "Check out" and "Details" tabs you should see a warning with a button allowing to change the category 5) Set a valid category according to patron's age 6) Warning should disappear 7) Perform similar test again, but instead of changing the age change the limits of a category Comment on attachment 56805 [details] [review] Added warning about age being of-of-limits Review of attachment 56805 [details] [review]: ----------------------------------------------------------------- ::: koha-tmpl/intranet-tmpl/prog/en/includes/category-out-of-age-limit.inc @@ +1,1 @@ > +[% IF age_limitations %] IFs like this are use in .tt files, so this is duplicate ::: koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ +790,4 @@ > [% IF ( odues ) %]<li>[% IF ( nonreturns ) %]<span class="circ-hlt">Overdues: Patron has ITEMS OVERDUE.</span> <a href="#checkouts">See highlighted items below</a>[% END %]</li> > [% END %] > > + [% IF ( charges || age_limitations ) %] Is this IF really necessary? You're right, the IFs are duplicated, they aren't truly necessary, but it's implemented intentionally. The same approach occures in more files within intranet-tmpl/prog/en/includes/*.inc and I copied it exactly from blocked-fines.inc. It can be understood as en extra security check, because these *.inc files can be included from anywhere and one cannot presume these checks to be truly performed BEFORE the file inclusion. So it's just a last resort to prevent a failure in code. What is the intended use case? It's imposible to follow the test plan as Koha does check whether the age is between category limits when on saving patron data. Maybe one picture is worth a thousand words... http://prntscr.com/cywxq0 Intended use case is NOT on saving patron data, but rather during usual circulation process. Very useful feature e.g. if kids grow out of their category. I tested it by changing the age limits of the category "Kid". The message displays as expected e.g. for kids who do no longer match the age limits. (Would be nice to get the message on the patron's Detail page as well.) While testing I found following error: If I click on the button "Change category", I get a 'page not found". It seems that the link is not correct: (...)/cgi-bin/koha/circ/memberentry.pl?op=modify&borrowernumber=71&step=3 should be: (...)/cgi-bin/koha/members/memberentry.pl?op=modify&borrowernumber=71&step=3 Created attachment 56874 [details] [review] Fixed URL generation of "Change category" button Test plan: 1) Apply patch 2) Create a patron and assign him a category having age limits set 3) Change patron's age to be older/younger than category's limits 4) At "Check out" and "Details" tabs you should see a warning with a button allowing to change the category, eg.: - http://prntscr.com/cz7ch3 - http://prntscr.com/cz7em4 - http://prntscr.com/cz7dj1 5) Set a valid category according to patron's age 6) Warning should disappear 7) Perform similar test again, but instead of changing the age change the limits of a category 8) During tests verify "Change category" button everytime opens "Modify patron" page: http://prntscr.com/cz7g5q Great, links for changing category work now, message appears on Checkout and Detals tab. However QA tools complain for first patch: FAIL koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt FAIL forbidden patterns forbidden pattern: tab char (line 188) forbidden pattern: tab char (line 184) forbidden pattern: tab char (line 185) forbidden pattern: tab char (line 187) forbidden pattern: tab char (line 189) ...and for 3rd patch: FAIL koha-tmpl/intranet-tmpl/prog/en/includes/category-out-of-age-limit.inc FAIL forbidden patterns forbidden pattern: tab char (line 5) As I am new to Koha development, could you please tell me what tools and how have you run to find this? Maybe the problem is TAB instead of 4 spaces? (In reply to Radek Šiman (R-Bit Technology, s.r.o.) from comment #11) > As I am new to Koha development, could you please tell me what tools and how > have you run to find this? Maybe the problem is TAB instead of 4 spaces? Hi Radek Yes, it's the indentation, see: https://wiki.koha-community.org/wiki/Coding_Guidelines#PERL6:_Indentation For the QA tools see: https://wiki.koha-community.org/wiki/QA_Test_Tools Marc Created attachment 56933 [details] [review] Fixed forbidden patterns Can anybody help me, what am I doing wrong? Thanks. ../qa-test-tools/koha-qa.pl -v 2 -c 1 FAIL koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt OK forbidden patterns OK git manipulation OK spelling OK tt_valid FAIL valid_template Attempt to reload Koha/Template/Plugin/Koha.pm aborted. Compilation failed in require at /usr/lib/x86_64-linux-gnu/perl5/5.20/Template/Plugins.pm line 206. Problem concerning the QA script solved in a cooperation with Katrin. Asking to sign-off again. Created attachment 56934 [details] [review] Bug 17492: Added warning about age being of-of-limits Test plan: 1) Apply patch 2) Create a patron and assign him a category having age limits set 3) Change patron's age to be older/younger than category's limits 4) At "Check out" and "Details" tabs you should see a warning with a button allowing to change the category 5) Set a valid category according to patron's age 6) Warning should disappear 7) Perform similar test again, but instead of changing the age change the limits of a category https://bugs.koha-community.org/show_bug.cgi?id=17492 Tested all 4 patches together, works as expected Signed-off-by: Marc Véron <veron@veron.ch> Created attachment 56935 [details] [review] Bug 17492: Removed a line setting 'flagged' template parameter by mistake Test plan: 1) Apply patch 2) Create a patron and assign him a category having age limits set 3) Change patron's age to be older/younger than category's limits 4) At "Check out" and "Details" tabs you should see a warning with a button allowing to change the category 5) Set a valid category according to patron's age 6) Warning should disappear 7) Perform similar test again, but instead of changing the age change the limits of a category https://bugs.koha-community.org/show_bug.cgi?id=17492 Signed-off-by: Marc Véron <veron@veron.ch> Created attachment 56936 [details] [review] Bug 17492: Fixed URL generation of "Change category" button Test plan: 1) Apply patch 2) Create a patron and assign him a category having age limits set 3) Change patron's age to be older/younger than category's limits 4) At "Check out" and "Details" tabs you should see a warning with a button allowing to change the category, eg.: - http://prntscr.com/cz7ch3 - http://prntscr.com/cz7em4 - http://prntscr.com/cz7dj1 5) Set a valid category according to patron's age 6) Warning should disappear 7) Perform similar test again, but instead of changing the age change the limits of a category 8) During tests verify "Change category" button everytime opens "Modify patron" page: http://prntscr.com/cz7g5q https://bugs.koha-community.org/show_bug.cgi?id=17492 Signed-off-by: Marc Véron <veron@veron.ch> Created attachment 56937 [details] [review] Bug 17492: Fixed forbidden patterns https://bugs.koha-community.org/show_bug.cgi?id=17492 Signed-off-by: Marc Véron <veron@veron.ch> Hi Radek, The 2 remarks made by Josef in comment 4 are valid and should be fixed. Could you also prefix the commit message with the bug number and remove the url to this bug report please (see https://wiki.koha-community.org/wiki/Commit_messages)? Hi Jonathan, should I really remove those IFs, although the same approach is used in other *.inc files I learnt it from and commented in https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17492#c5 ? Created attachment 56976 [details] [review] Bug 17492: Removed extra IFs This patch removes unnecessary "if" conditions from html template files. Removed 'flagged' template parameter in circ/circulation.pl. Test plan: 1) Apply patch 2) Create a patron and assign him a category having age limits set 3) Change patron's age to be older/younger than category's limits 4) At "Check out" and "Details" tabs you should see a warning with a button allowing to change the category, eg.: - http://prntscr.com/cz7ch3 - http://prntscr.com/cz7em4 - http://prntscr.com/cz7dj1 5) Set a valid category according to patron's age 6) Warning should disappear 7) Perform similar test again, but instead of changing the age change the limits of a category 8) During tests verify "Change category" button everytime opens "Modify patron" page: http://prntscr.com/cz7g5q Created attachment 56985 [details] [review] Bug 17492: Removed extra IFs This patch removes unnecessary "if" conditions from html template files. Removed 'flagged' template parameter in circ/circulation.pl. Test plan: 1) Apply patch 2) Create a patron and assign him a category having age limits set 3) Change patron's age to be older/younger than category's limits 4) At "Check out" and "Details" tabs you should see a warning with a button allowing to change the category, eg.: - http://prntscr.com/cz7ch3 - http://prntscr.com/cz7em4 - http://prntscr.com/cz7dj1 5) Set a valid category according to patron's age 6) Warning should disappear 7) Perform similar test again, but instead of changing the age change the limits of a category 8) During tests verify "Change category" button everytime opens "Modify patron" page: http://prntscr.com/cz7g5q Created attachment 56986 [details] [review] Bug 17492: Added warning about age being of-limits Test plan: 1) Apply patch 2) Create a patron and assign him a category having age limits set 3) Change patron's age to be older/younger than category's limits 4) At "Check out" and "Details" tabs you should see a warning with a button allowing to change the category 5) Set a valid category according to patron's age 6) Warning should disappear 7) Perform similar test again, but instead of changing the age change the limits of a category Created attachment 56987 [details] [review] Bug 17492: Removed a line setting 'flagged' template parameter by mistake Test plan: 1) Apply patch 2) Create a patron and assign him a category having age limits set 3) Change patron's age to be older/younger than category's limits 4) At "Check out" and "Details" tabs you should see a warning with a button allowing to change the category 5) Set a valid category according to patron's age 6) Warning should disappear 7) Perform similar test again, but instead of changing the age change the limits of a category Created attachment 56988 [details] [review] Bug 17492: Fixed URL generation of "Change category" button Test plan: 1) Apply patch 2) Create a patron and assign him a category having age limits set 3) Change patron's age to be older/younger than category's limits 4) At "Check out" and "Details" tabs you should see a warning with a button allowing to change the category, eg.: - http://prntscr.com/cz7ch3 - http://prntscr.com/cz7em4 - http://prntscr.com/cz7dj1 5) Set a valid category according to patron's age 6) Warning should disappear 7) Perform similar test again, but instead of changing the age change the limits of a category 8) During tests verify "Change category" button everytime opens "Modify patron" page: http://prntscr.com/cz7g5q Created attachment 56989 [details] [review] Bug 17492: Fixed forbidden patterns Created attachment 56990 [details] [review] Bug 17492: Removed extra IFs This patch removes unnecessary "if" conditions from html template files. Removed 'flagged' template parameter in circ/circulation.pl. Test plan: 1) Apply patch 2) Create a patron and assign him a category having age limits set 3) Change patron's age to be older/younger than category's limits 4) At "Check out" and "Details" tabs you should see a warning with a button allowing to change the category, eg.: - http://prntscr.com/cz7ch3 - http://prntscr.com/cz7em4 - http://prntscr.com/cz7dj1 5) Set a valid category according to patron's age 6) Warning should disappear 7) Perform similar test again, but instead of changing the age change the limits of a category 8) During tests verify "Change category" button everytime opens "Modify patron" page: http://prntscr.com/cz7g5q Fixed all problems mentioned by Jonathan in comment 20. Asking anybody interested in this issue to sign-off the attachments again. Thanks. No other signoff requested. Created attachment 56995 [details] [review] Bug 17492: Add a warning about age being of-limits and a button to update it This patch adds a warning if a patron's age is out of limits if an assigned category. It also adds a button allowing to change the category. Test plan: 1) Apply patch 2) Create a patron and assign him a category having age limits set 3) Change patron's age to be older/younger than category's limits 4) At "Check out" and "Details" tabs you should see a warning with a button allowing to change the category, eg.: - http://prntscr.com/cz7ch3 - http://prntscr.com/cz7em4 - http://prntscr.com/cz7dj1 5) Set a valid category according to patron's age 6) Warning should disappear 7) Perform similar test again, but instead of changing the age change the limits of a category 8) During tests verify "Change category" button everytime opens "Modify patron" page: http://prntscr.com/cz7g5q Tested all 4 patches together, works as expected Signed-off-by: Marc Véron <veron@veron.ch> Bug 17492: Removed a line setting 'flagged' template parameter by mistake Signed-off-by: Marc Véron <veron@veron.ch> Bug 17492: Fixed URL generation of "Change category" button Signed-off-by: Marc Véron <veron@veron.ch> Bug 17492: Fixed forbidden patterns Signed-off-by: Marc Véron <veron@veron.ch> Bug 17492: Removed extra IFs Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Note: - I have squashed the 5 patches to easy the readability (too many changes on the same lines). - After confirmation with Radek, I have updated the commit author's name and email. QA note: It would have been better to move the logic code into a module (for instance Koha::Patron->is_category_valid or something) to permit test coverage and avoid code duplication. As this is the first Radek patch, I think it can be accepted as it. Hm sorry, just found something: If you click on the "change category" button, you have the "step=3" parameter. But this step does not check if the patron category is valid. For instance if you edit a Kid (5 to 17) and the patron has 18, the form will prompt you that the category is not valid. I think we should have this check on this page. Failing QA to get feedback from author and/or testers. It looks like bug in master, we could probably pass this path now and open another bug report... (In reply to Josef Moravec from comment #34) > It looks like bug in master, we could probably pass this path now and open > another bug report... Yes, indeed. Just FYI: bug 17521 will solve the problem mentioned in comment 34. This patch need rebase and adjusment due to bug 17557. And minor adjustment due to bug 16239, but I can attach followup after... Created attachment 62860 [details] [review] Bug 17942 - Update style of the web installer with Bootstrap 3 This patch makes style and markup changes to the web installer and new onboarding tool (Bug 17855). - Markup has been corrected, improved, and in many places reindented. - Some page titles have been made more specific. - Some JavaScript and CSS have been moved to separate files. In the onboarding tool I have removed form validation from the markup and JavaScript in many cases where the requirements were not matched elsewhere in Koha. For instance, we shouldn't limit item type descriptions to only letters because the database doesn't require such a limit. To test, apply the patch and run the web installer with an empty database. Confirm that the installation process completes correctly and that each page looks good and works correctly. Followed test plan, works and siplays as advertised. Signed-off-by: Marc Véron <veron@veron.ch> Comment on attachment 62860 [details] [review] Bug 17942 - Update style of the web installer with Bootstrap 3 Sorry, mistaked with bug number... Can anybody rebase it on master? Created attachment 67040 [details] [review] Bug 17492: Add a warning about age being of-limits and a button to update it This patch adds a warning if a patron's age is out of limits if an assigned category. It also adds a button allowing to change the category. Test plan: 1) Apply patch 2) Create a patron and assign him a category having age limits set 3) Change patron's age to be older/younger than category's limits 4) At "Check out" and "Details" tabs you should see a warning with a button allowing to change the category, eg.: - http://prntscr.com/cz7ch3 - http://prntscr.com/cz7em4 - http://prntscr.com/cz7dj1 5) Set a valid category according to patron's age 6) Warning should disappear 7) Perform similar test again, but instead of changing the age change the limits of a category 8) During tests verify "Change category" button everytime opens "Modify patron" page: http://prntscr.com/cz7g5q Tested all 4 patches together, works as expected Signed-off-by: Marc Véron <veron@veron.ch> Bug 17492: Removed a line setting 'flagged' template parameter by mistake Signed-off-by: Marc Véron <veron@veron.ch> Bug 17492: Fixed URL generation of "Change category" button Signed-off-by: Marc Véron <veron@veron.ch> Bug 17492: Fixed forbidden patterns Signed-off-by: Marc Véron <veron@veron.ch> Bug 17492: Removed extra IFs Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 67041 [details] [review] Bug 17492: Followup - use bootstrap 3 button classes Created attachment 67042 [details] [review] Bug 17492: Followup - adapt the code to current master I just rebased and added two small followup - but we probably should do it as Jonathan suggests in comment 32 : $patron->is_category_valid I am sorry, but with the patches applied, the layout on the patron detail page is broken badly. /cgi-bin/koha/members/moremember.pl?borrowernumber=51 Created attachment 67850 [details] [review] Bug 17492: (followup) Fixed broken layout of the patron detail page Test plan: 1) apply this patch 2) open eg. /cgi-bin/koha/members/moremember.pl?borrowernumber=3 3) tabbed menu (checkout, details, fines, etc.) should be displayed on the left side of the page not at the bottom Created attachment 67851 [details] [review] Bug 17492: (followup) Logic moved to Koha namespace Test plan: 1) Apply patch 2) Create a patron and assign him a category having age limits set 3) Change patron's age to be older/younger than category's limits 4) At "Check out" and "Details" tabs you should see a warning with a button allowing to change the category, eg.: - http://prntscr.com/cz7ch3 - http://prntscr.com/cz7em4 - http://prntscr.com/cz7dj1 5) Set a valid category according to patron's age 6) Warning should disappear 7) Perform similar test again, but instead of changing the age change the limits of a category 8) During tests verify "Change category" button everytime opens "Modify patron" page: http://prntscr.com/cz7g5q 9) Ensure that left-side panel is always on its expected place I feel we need test for method is_category_valid Created attachment 67867 [details] [review] Bug 17492: (followup) Added missing tests This patch only adds a missing condition to test defined age in is_category_valid method. The other task of this patch is to add missing automated db-dependent tests. Test plan: 1) Apply patch 2) Create a patron and assign him a category having age limits set 3) Change patron's age to be older/younger than category's limits 4) At "Check out" and "Details" tabs you should see a warning with a button allowing to change the category, eg.: - http://prntscr.com/cz7ch3 - http://prntscr.com/cz7em4 - http://prntscr.com/cz7dj1 5) Set a valid category according to patron's age 6) Warning should disappear 7) Perform similar test again, but instead of changing the age change the limits of a category 8) During tests verify "Change category" button everytime opens "Modify patron" page: http://prntscr.com/cz7g5q 9) Ensure that left-side panel is always on its expected place 10) Remove patron's date of birth and test that all categories are allowed now 11) Run automated tests: prove t/db_dependent/Koha/Patron.t Created attachment 67868 [details] [review] Bug 17509: Removed invalid patterns This patch only removes invalid gender-specific patterns from messages in automated tests. Created attachment 68139 [details] [review] Bug 17492: Add a warning about age being of-limits and a button to update it This patch adds a warning if a patron's age is out of limits if an assigned category. It also adds a button allowing to change the category. Test plan: 1) Apply patch 2) Create a patron and assign him a category having age limits set 3) Change patron's age to be older/younger than category's limits 4) At "Check out" and "Details" tabs you should see a warning with a button allowing to change the category, eg.: - http://prntscr.com/cz7ch3 - http://prntscr.com/cz7em4 - http://prntscr.com/cz7dj1 5) Set a valid category according to patron's age 6) Warning should disappear 7) Perform similar test again, but instead of changing the age change the limits of a category 8) During tests verify "Change category" button everytime opens "Modify patron" page: http://prntscr.com/cz7g5q Tested all 4 patches together, works as expected Signed-off-by: Marc Véron <veron@veron.ch> Bug 17492: Removed a line setting 'flagged' template parameter by mistake Signed-off-by: Marc Véron <veron@veron.ch> Bug 17492: Fixed URL generation of "Change category" button Signed-off-by: Marc Véron <veron@veron.ch> Bug 17492: Fixed forbidden patterns Signed-off-by: Marc Véron <veron@veron.ch> Bug 17492: Removed extra IFs Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 68140 [details] [review] Bug 17492: Followup - use bootstrap 3 button classes Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 68141 [details] [review] Bug 17492: Followup - adapt the code to current master Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 68142 [details] [review] Bug 17492: (followup) Fixed broken layout of the patron detail page Test plan: 1) apply this patch 2) open eg. /cgi-bin/koha/members/moremember.pl?borrowernumber=3 3) tabbed menu (checkout, details, fines, etc.) should be displayed on the left side of the page not at the bottom Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 68143 [details] [review] Bug 17492: (followup) Logic moved to Koha namespace Test plan: 1) Apply patch 2) Create a patron and assign him a category having age limits set 3) Change patron's age to be older/younger than category's limits 4) At "Check out" and "Details" tabs you should see a warning with a button allowing to change the category, eg.: - http://prntscr.com/cz7ch3 - http://prntscr.com/cz7em4 - http://prntscr.com/cz7dj1 5) Set a valid category according to patron's age 6) Warning should disappear 7) Perform similar test again, but instead of changing the age change the limits of a category 8) During tests verify "Change category" button everytime opens "Modify patron" page: http://prntscr.com/cz7g5q 9) Ensure that left-side panel is always on its expected place Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 68144 [details] [review] Bug 17492: (followup) Added missing tests This patch only adds a missing condition to test defined age in is_category_valid method. The other task of this patch is to add missing automated db-dependent tests. Test plan: 1) Apply patch 2) Create a patron and assign him a category having age limits set 3) Change patron's age to be older/younger than category's limits 4) At "Check out" and "Details" tabs you should see a warning with a button allowing to change the category, eg.: - http://prntscr.com/cz7ch3 - http://prntscr.com/cz7em4 - http://prntscr.com/cz7dj1 5) Set a valid category according to patron's age 6) Warning should disappear 7) Perform similar test again, but instead of changing the age change the limits of a category 8) During tests verify "Change category" button everytime opens "Modify patron" page: http://prntscr.com/cz7g5q 9) Ensure that left-side panel is always on its expected place 10) Remove patron's date of birth and test that all categories are allowed now 11) Run automated tests: prove t/db_dependent/Koha/Patron.t Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 68145 [details] [review] Bug 17509: Removed invalid patterns This patch only removes invalid gender-specific patterns from messages in automated tests. https://bugs.koha-community.org/show_bug.cgi?id=17492 Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Applying: Bug 17492: (followup) Added missing tests fatal: sha1 information is lacking or useless (Koha/Patron.pm). Repository lacks necessary blobs to fall back on 3-way merge. Is possible to rebase this on master? Created attachment 91028 [details] [review] Bug 17492: Add a warning about age being of-limits and a button to update it This patch adds a warning if a patron's age is out of limits if an assigned category. It also adds a button allowing to change the category. Test plan: 1) Apply patch 2) Create a patron and assign him a category having age limits set 3) Change patron's age to be older/younger than category's limits 4) At "Check out" and "Details" tabs you should see a warning with a button allowing to change the category, eg.: - http://prntscr.com/cz7ch3 - http://prntscr.com/cz7em4 - http://prntscr.com/cz7dj1 5) Set a valid category according to patron's age 6) Warning should disappear 7) Perform similar test again, but instead of changing the age change the limits of a category 8) During tests verify "Change category" button everytime opens "Modify patron" page: http://prntscr.com/cz7g5q 9) Ensure that left-side panel is always on its expected place 10) Remove patron's date of birth and test that all categories are allowed now 11) Run automated tests: prove t/db_dependent/Koha/Patron.t Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 91029 [details] [review] Bug 17492: (follow-up) Add missing filters (In reply to Michal Denar from comment #59) > Is possible to rebase this on master? Rebased Hi Josef, test plan works, but test faila: annot detect source of 'Patron.t'! at /usr/share/perl/5.24/TAP/Parser/IteratorFactory.pm line 261. TAP::Parser::IteratorFactory::detect_source(TAP::Parser::IteratorFactory=HASH(0x55d0ebbf2e18), TAP::Parser::Source=HASH(0x55d0ebbf2ed8)) called at /usr/share/perl/5.24/TAP/Parser/IteratorFactory.pm line 211 TAP::Parser::IteratorFactory::make_iterator(TAP::Parser::IteratorFactory=HASH(0x55d0ebbf2e18), TAP::Parser::Source=HASH(0x55d0ebbf2ed8)) called at /usr/share/perl/5.24/TAP/Parser.pm line 472 TAP::Parser::_initialize(TAP::Parser=HASH(0x55d0ebbf2ad0), HASH(0x55d0eb9a6b08)) called at /usr/share/perl/5.24/TAP/Object.pm line 55 TAP::Object::new("TAP::Parser", HASH(0x55d0eb9a6b08)) called at /usr/share/perl/5.24/TAP/Object.pm line 130 TAP::Object::_construct(TAP::Harness=HASH(0x55d0eb8c93d8), "TAP::Parser", HASH(0x55d0eb9a6b08)) called at /usr/share/perl/5.24/TAP/Harness.pm line 852 TAP::Harness::make_parser(TAP::Harness=HASH(0x55d0eb8c93d8), TAP::Parser::Scheduler::Job=HASH(0x55d0ebbc4e40)) called at /usr/share/perl/5.24/TAP/Harness.pm line 651 TAP::Harness::_aggregate_single(TAP::Harness=HASH(0x55d0eb8c93d8), TAP::Parser::Aggregator=HASH(0x55d0eb42d820), TAP::Parser::Scheduler=HASH(0x55d0ebbc4de0)) called at /usr/share/perl/5.24/TAP/Harness.pm line 743 TAP::Harness::aggregate_tests(TAP::Harness=HASH(0x55d0eb8c93d8), TAP::Parser::Aggregator=HASH(0x55d0eb42d820), "Patron.t") called at /usr/share/perl/5.24/TAP/Harness.pm line 558 TAP::Harness::__ANON__() called at /usr/share/perl/5.24/TAP/Harness.pm line 571 TAP::Harness::runtests(TAP::Harness=HASH(0x55d0eb8c93d8), "Patron.t") called at /usr/share/perl/5.24/App/Prove.pm line 546 App::Prove::_runtests(App::Prove=HASH(0x55d0eb41d548), HASH(0x55d0eb88e210), "Patron.t") called at /usr/share/perl/5.24/App/Prove.pm line 504 App::Prove::run(App::Prove=HASH(0x55d0eb41d548)) called at /usr/bin/prove line 13 (In reply to Michal Denar from comment #63) > Hi Josef, > test plan works, but test faila: > > annot detect source of 'Patron.t'! at the file name in test plan s bad, you should run: prove t/db_dependent/Koha/Patrons.t Created attachment 91044 [details] [review] Bug 17492: Add a warning about age being of-limits and a button to update it This patch adds a warning if a patron's age is out of limits if an assigned category. It also adds a button allowing to change the category. Test plan: 1) Apply patch 2) Create a patron and assign him a category having age limits set 3) Change patron's age to be older/younger than category's limits 4) At "Check out" and "Details" tabs you should see a warning with a button allowing to change the category, eg.: - http://prntscr.com/cz7ch3 - http://prntscr.com/cz7em4 - http://prntscr.com/cz7dj1 5) Set a valid category according to patron's age 6) Warning should disappear 7) Perform similar test again, but instead of changing the age change the limits of a category 8) During tests verify "Change category" button everytime opens "Modify patron" page: http://prntscr.com/cz7g5q 9) Ensure that left-side panel is always on its expected place 10) Remove patron's date of birth and test that all categories are allowed now 11) Run automated tests: prove t/db_dependent/Koha/Patron.t Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> Created attachment 91045 [details] [review] Bug 17492: (follow-up) Add missing filters Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> Created attachment 91098 [details] [review] Bug 17492: Add a warning about age being of-limits and a button to update it This patch adds a warning if a patron's age is out of limits if an assigned category. It also adds a button allowing to change the category. Test plan: 1) Apply patch 2) Create a patron and assign him a category having age limits set 3) Change patron's age to be older/younger than category's limits 4) At "Check out" and "Details" tabs you should see a warning with a button allowing to change the category, eg.: - http://prntscr.com/cz7ch3 - http://prntscr.com/cz7em4 - http://prntscr.com/cz7dj1 5) Set a valid category according to patron's age 6) Warning should disappear 7) Perform similar test again, but instead of changing the age change the limits of a category 8) During tests verify "Change category" button everytime opens "Modify patron" page: http://prntscr.com/cz7g5q 9) Ensure that left-side panel is always on its expected place 10) Remove patron's date of birth and test that all categories are allowed now 11) Run automated tests: prove t/db_dependent/Koha/Patron.t Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> Created attachment 91099 [details] [review] Bug 17492: (follow-up) Add missing filters Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> Created attachment 91100 [details] [review] Bug 17492: (QA follow-up) Correct template variable Nice work! Pushed to master for 19.11.00 Enhancement not pushed to 19.05.x |