Bug 13787

Summary: Clean up noisy koha qa tool warnings
Product: Koha Reporter: Mark Tompsett <mtompset>
Component: SearchingAssignee: Mark Tompsett <mtompset>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: jonathan.druart, tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10937
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 13787 - Clean up noisy opac-advsearch warnings
Bug 13787 - Clean up noisy opac-advsearch warnings
Bug 13787 - Clean up noisy opac-advsearch warnings

Description Mark Tompsett 2015-03-04 02:01:39 UTC
While testing bug 10937, there were noisy warnings, which
distracted from testing the functionality of it.

Here is a snippet of the after the patch warnings:
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 384.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 161.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 161.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 177.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 177.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 202.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 202.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 240.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 240.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 256.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 256.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 356.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 356.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 369.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 369.

Tweaking the [% IF %] statements eliminated the warnings.

TEST PLAN
---------
1) Apply patch
2) Run koha qa test tools.
   -- there will be noisy warnings in the before processing, but
      there will be no such messages in the after processing.
3) git diff origin/master
   -- there should be no visible typos.
Comment 1 Mark Tompsett 2015-03-04 02:02:36 UTC Comment hidden (obsolete)
Comment 2 Magnus Enger 2015-03-05 10:59:38 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2015-03-05 14:51:55 UTC
Created attachment 36610 [details] [review]
Bug 13787 - Clean up noisy opac-advsearch warnings

While testing bug 10937, there were noisy warnings, which
distracted from testing the functionality of it.

Here is a snippet of the after the patch warnings:
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 384.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 161.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 161.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 177.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 177.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 202.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 202.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 240.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 240.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 256.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 256.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 356.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 356.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 369.
Argument "" isn't numeric in numeric gt (>) at /home/mtompset/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt line 369.

Tweaking the [% IF %] statements eliminated the warnings.

TEST PLAN
---------
1) Apply patch
2) Run koha qa test tools.
   -- there will be noisy warnings in the before processing, but
      there will be no such messages in the after processing.
3) git diff origin/master
   -- there should be no visible typos.

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
- Applied the patch from bug 10937
- Ran "koha-qa.pl -c 1" and observed the warnings described in the
  commit message
- Applied the patch from this bug
- Ran "koha-qa.pl -c 1" again and saw no warnings
- Ran "koha-qa.pl -c 2" and saw no warnings

I have not tested the functionality of 10937 with this patch, just verified
that the changes look sensible.

This patch feels more like a followup for 10937, than a separate patch,
especially since 10937 is just "signed off" at this time. But as long as it
works...

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 4 Jonathan Druart 2015-03-05 14:52:46 UTC
I removed the dependency, this patch can be pushed before bug 10937.
Comment 5 Mark Tompsett 2015-03-05 15:01:52 UTC
There is no need to expressly test bug 10937, you can put a blank line into opac-advsearch.tt and trigger the same problems.

I was merely giving a historical context. It does not depend solely on 10937. It depends on anyone making a modification to the opac-advsearch.tt template file. Thank you for changing this from 'Depends on' to 'See also', Jonathan.

Consider that this patch modifies that file. You should the problems before, but not after the processing when running the koha qa tool.
Comment 6 Tomás Cohen Arazi 2015-03-07 21:12:36 UTC
Patch pushed to master.

Thanks Mark!