Bug 14186

Summary: Noisy warns in opac-reserve.pl
Product: Koha Reporter: Aleisha Amohia <aleisha>
Component: OPACAssignee: Aleisha Amohia <aleisha>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: chris, indradg, mtj, tomascohen, wizzyrea
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 14186: Undefined $reservedfor causes warn in opac-reserve.pl
Bug 14186: Undefined $reservedfor causes warn in opac-reserve.pl
[FOLLOWUP] Bug 14186: Undefined $reservedfor causes warn in opac-reserve.pl
[PASSED QA] Bug 14186: Undefined $reservedfor causes warn in opac-reserve.pl
[PASSED QA] Bug 14186: Undefined $reservedfor causes warn in opac-reserve.pl
[PASSED QA] Bug 14186: Undefined $reservedfor causes warn in opac-reserve.pl
[PASSED QA] Bug 14186 [QA Followup]: Undefined $reservedfor causes warn in opac-reserve.pl

Description Aleisha Amohia 2015-05-12 05:40:13 UTC
If $reservedfor is undefined, a warn comes up in error log
Comment 1 Aleisha Amohia 2015-05-12 05:48:23 UTC Comment hidden (obsolete)
Comment 2 Indranil Das Gupta 2015-05-13 09:21:10 UTC
Comment on attachment 39057 [details] [review]
Bug 14186: Undefined $reservedfor causes warn in opac-reserve.pl

Review of attachment 39057 [details] [review]:
-----------------------------------------------------------------

Hi Aleisha,

Would you be considering making the small change mtompset@hotmail.com suggested in bug 14185, comment 3 for this patch?

If you do, then I'll wait for your update, before I sign off on this.
Comment 3 Indranil Das Gupta 2015-05-14 01:08:10 UTC
(In reply to Indranil Das Gupta from comment #2)
> Comment on attachment 39057 [details] [review] [review]
> Bug 14186: Undefined $reservedfor causes warn in opac-reserve.pl
> 
> Review of attachment 39057 [details] [review] [review]:
> -----------------------------------------------------------------
> 
> Hi Aleisha,
> 
> Would you be considering making the small change mtompset@hotmail.com
> suggested in bug 14185, comment 3 for this patch?
> 
> If you do, then I'll wait for your update, before I sign off on this.

^^^ the question is no longer relevant. Will proceed with testing.
Comment 4 Indranil Das Gupta 2015-05-14 01:35:23 UTC Comment hidden (obsolete)
Comment 5 Indranil Das Gupta 2015-05-14 01:41:31 UTC
Comment on attachment 39175 [details] [review]
Bug 14186: Undefined $reservedfor causes warn in opac-reserve.pl

Result of QA test

 FAIL	opac/opac-reserve.pl
   OK	  critic
   FAIL	  forbidden patterns
		forbidden pattern: tab char (line 470)
   OK	  pod
   OK	  valid
Comment 6 Indranil Das Gupta 2015-05-14 02:09:10 UTC Comment hidden (obsolete)
Comment 7 Kyle M Hall 2015-05-22 12:30:08 UTC Comment hidden (obsolete)
Comment 8 Kyle M Hall 2015-05-22 12:30:14 UTC Comment hidden (obsolete)
Comment 9 Kyle M Hall 2015-05-22 12:31:27 UTC
Created attachment 39401 [details] [review]
[PASSED QA] Bug 14186: Undefined $reservedfor causes warn in opac-reserve.pl

This patch sets $reservedfor to an empty string.

Test plan
=========

1/ in a terminal, run `tail -f ` on your instance's opac-error.log
2/ go to the opac and search from an item that exists on the Koha
   instance.
3/ Select the title (if more than one title is returned) and click on
   'Place hold' link to go to opac-reserve.pl
4/ notice the warning - "opac-reserve.pl: Use of uninitialized value
   $reservedfor" appear in the `tail`ed opac-error.log
5/ apply the patch
6/ reload the page (opac-reserve.pl)
7/ page works but the warning in step #4 is no longer thrown up
8/ run qa test (i.e. koha-qa.pl -c 1 -v 2), there should be no error

Remarks: The QA test failed - "forbidden pattern: tab char (line 470)".

         Marking this as 'FAILED QA'

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 10 Kyle M Hall 2015-05-22 12:31:34 UTC
Created attachment 39402 [details] [review]
[PASSED QA] Bug 14186 [QA Followup]: Undefined $reservedfor causes warn in opac-reserve.pl

This is a followup for Bug 14186 that removes the extraneous tab
char on line 470, so that the patch can clear QA tools.

This patch sets $reservedfor to an empty string.

Test plan
=========

1/ in a terminal, run `tail -f ` on your instance's opac-error.log
2/ go to the opac and search from an item that exists on the Koha
   instance.
3/ Select the title (if more than one title is returned) and click on
   'Place hold' link to go to opac-reserve.pl
4/ notice the warning - "opac-reserve.pl: Use of uninitialized value
   $reservedfor" appear in the `tail`ed opac-error.log
5/ apply the patch
6/ reload the page (opac-reserve.pl)
7/ page works but the warning in step #4 is no longer thrown up
8/ run qa test (i.e. koha-qa.pl -c 1 -v 2), there should be no error

Remarks: Testing result match expected test plan output. The QA tests
         pass with "OK" for the commit.

Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 11 Tomás Cohen Arazi 2015-05-26 14:05:45 UTC
Patch pushed to master.

Thanks Aleisha and congratulations Indranil for your first patch!
Comment 12 Chris Cormack 2015-05-27 04:26:44 UTC
Pushed to 3.20.x will be in 3.20.1
Comment 13 Liz Rea 2015-06-22 22:35:34 UTC
Patch pushed to 3.18.x will be in 3.18.08
Comment 14 Mason James 2015-07-25 09:33:33 UTC
Pushed to 3.16.x, will be in 3.16.13