Bug 12675 - Remove CGI::scrolling_list from labeledMARCdetail.pl
Summary: Remove CGI::scrolling_list from labeledMARCdetail.pl
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Bernardo Gonzalez Kriegel
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-29 20:14 UTC by Bernardo Gonzalez Kriegel
Modified: 2015-06-04 23:33 UTC (History)
1 user (show)

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


Attachments
Bug 12675: Remove CGI::scrolling_list from labeledMARCdetail.pl (7.49 KB, patch)
2014-07-29 20:20 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 12675: Remove CGI::scrolling_list from labeledMARCdetail.pl (7.56 KB, patch)
2014-07-31 14:29 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 12675: Add unit test to GetFrameworksLoop (2.06 KB, patch)
2014-07-31 14:31 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 12675: Add unit test to GetFrameworksLoop (2.60 KB, patch)
2014-07-31 16:26 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 12675: Remove CGI::scrolling_list from labeledMARCdetail.pl (7.66 KB, patch)
2014-07-31 19:35 UTC, Owen Leonard
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 12675: Add unit test to GetFrameworksLoop (2.70 KB, patch)
2014-07-31 19:40 UTC, Owen Leonard
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 12675: Add unit test to GetFrameworksLoop (2.66 KB, patch)
2014-08-02 23:32 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
[PASSED QA] Bug 12675: Remove CGI::scrolling_list from labeledMARCdetail.pl (7.72 KB, patch)
2014-08-03 09:50 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 12675: Add unit test to GetFrameworksLoop (2.71 KB, patch)
2014-08-03 09:50 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 Bernardo Gonzalez Kriegel 2014-07-29 20:14:22 UTC
One instance in this file
Comment 1 Bernardo Gonzalez Kriegel 2014-07-29 20:20:05 UTC Comment hidden (obsolete)
Comment 2 Bernardo Gonzalez Kriegel 2014-07-29 20:21:12 UTC
This still needs a unit test, trying to figure out how to write it :)
Comment 3 Bernardo Gonzalez Kriegel 2014-07-31 14:29:09 UTC Comment hidden (obsolete)
Comment 4 Bernardo Gonzalez Kriegel 2014-07-31 14:31:40 UTC Comment hidden (obsolete)
Comment 5 Bernardo Gonzalez Kriegel 2014-07-31 16:26:44 UTC Comment hidden (obsolete)
Comment 6 Bernardo Gonzalez Kriegel 2014-07-31 16:27:43 UTC
Ready to sign
Comment 7 Owen Leonard 2014-07-31 19:35:34 UTC Comment hidden (obsolete)
Comment 8 Owen Leonard 2014-07-31 19:40:13 UTC Comment hidden (obsolete)
Comment 9 Katrin Fischer 2014-08-02 21:07:49 UTC
Hm Bernardo, could you take a look at the test file? It works, but I wonder if  $dbh->rollback(); should not be outside of the last subtest. Also, the new subtests are the only ones not printing anything when doing
perl t/db_dependent/Koha.t - but I can see there are comments in the file.

Please switch back to Signed off if the changes are not too big.
Comment 10 Bernardo Gonzalez Kriegel 2014-08-02 23:32:18 UTC Comment hidden (obsolete)
Comment 11 Bernardo Gonzalez Kriegel 2014-08-02 23:43:15 UTC
(In reply to Katrin Fischer from comment #9)
> Hm Bernardo, could you take a look at the test file? It works, but I wonder
> if  $dbh->rollback(); should not be outside of the last subtest. Also, the
> new subtests are the only ones not printing anything when doing
> perl t/db_dependent/Koha.t - but I can see there are comments in the file.
> 
> Please switch back to Signed off if the changes are not too big.

Katrin, I moved the roolback() to the end of file outside subtest. 
It's the only change.

Now, messages. Using perl t/db_dependent/Koha.t I got

    # Subtest: GetFrameworksLoop() tests
    1..6
    ok 1 - No frameworks
    ok 2 - All frameworks
    ok 3 - None selected
    ok 4 - One selected
    ok 5 - Ordered result
    ok 6 - Full check, sorted by description with selected val (Bug 12675)
ok 8 - GetFrameworksLoop() tests

Do they not shown to you?
Comment 12 Katrin Fischer 2014-08-03 07:49:03 UTC
You are right, I think I miread it expecting it to be below the last line seeing it as the heading. Sorry!
Comment 13 Katrin Fischer 2014-08-03 09:50:37 UTC
Created attachment 30507 [details] [review]
[PASSED QA] Bug 12675: Remove CGI::scrolling_list from labeledMARCdetail.pl

This patch removes only instance in this file.

Also updates getframework POD on C4/Koha.pm,
adds new GetFrameworksLoop() func on same file from
suggested code, but with ordered result.

To test:
1. Apply the patch
2. Enable viewLabeledMARC syspref
3. On staff, search for a record, goto detail view
4. Clic on Labeled MARC
5. Framework pulldown was replaced, check changing
framework.

A bug was fixed, because selecting any fw and then Default
tries to load values from 'Default' fw code, which does not
exists.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes tests and QA script.
Comment 14 Katrin Fischer 2014-08-03 09:50:49 UTC
Created attachment 30508 [details] [review]
[PASSED QA] Bug 12675: Add unit test to GetFrameworksLoop

to test:
1. Apply the patch
2. Run the test, prove t/db_dependent/Koha.t
3. Check that it pass

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comment 15 Tomás Cohen Arazi (tcohen) 2014-08-03 20:40:23 UTC
Patches pushed to master.

New function, proper unit tests!
Thanks Bernardo!