Bug 14061 - Inventory fails to map withdrawn authorized values
Summary: Inventory fails to map withdrawn authorized values
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Galen Charlton
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-24 14:02 UTC by Mark Tompsett
Modified: 2015-12-03 22:00 UTC (History)
2 users (show)

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


Attachments
Bug 14061: Fix broken mapping for not withdrawn items. (1.21 KB, patch)
2015-04-24 14:13 UTC, Mark Tompsett
Details | Diff | Splinter Review
statuses say 0 (25.43 KB, image/png)
2015-04-24 14:18 UTC, Nicole C. Engard
Details
after patch (35.44 KB, image/png)
2015-04-24 14:21 UTC, Nicole C. Engard
Details
authorized values on first test (44.39 KB, image/png)
2015-04-24 14:31 UTC, Nicole C. Engard
Details
authorized values on second test (47.81 KB, image/png)
2015-04-24 14:32 UTC, Nicole C. Engard
Details
withdrawn cataloging (20.92 KB, image/png)
2015-04-24 14:40 UTC, Nicole C. Engard
Details
limit to withdrawn with patch (50.39 KB, image/png)
2015-04-24 14:41 UTC, Nicole C. Engard
Details
Bug 14061: Fix broken mapping for not withdrawn items. (2.37 KB, patch)
2015-04-24 14:44 UTC, Mark Tompsett
Details | Diff | Splinter Review
[Signed-off] Bug 14061: Fix broken mapping for not withdrawn items. (2.62 KB, patch)
2015-04-25 08:58 UTC, Marc Véron
Details | Diff | Splinter Review
[PASSED QA] Bug 14061: Fix broken mapping for not withdrawn items. (2.58 KB, patch)
2015-05-01 12:46 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Tompsett 2015-04-24 14:02:14 UTC
if ($f and $sf) fails if:
$f is NULL,'', or 0
and similarly with $sf.
952$0 = withdrawn status.
This should be (defined $f and defined $sf).
Comment 1 Mark Tompsett 2015-04-24 14:13:39 UTC Comment hidden (obsolete)
Comment 2 Nicole C. Engard 2015-04-24 14:18:53 UTC
Created attachment 38486 [details]
statuses say 0

It's not just withdrawn that shows 0 by the way ... it's all status columns
Comment 3 Nicole C. Engard 2015-04-24 14:20:24 UTC
Also, after applying the patch I still see 0 ...
Comment 4 Nicole C. Engard 2015-04-24 14:21:28 UTC
Created attachment 38487 [details]
after patch

I still see 0 after patch.
Comment 5 Mark Tompsett 2015-04-24 14:27:05 UTC
Please post a screen shot of your authorized values for WITHDRAWN.
If there is no mapping for WITHDRAWN=0, then it will still show 0.
Comment 6 Nicole C. Engard 2015-04-24 14:31:57 UTC
Created attachment 38488 [details]
authorized values on first test

I didn't have a zero
Comment 7 Nicole C. Engard 2015-04-24 14:32:17 UTC
Created attachment 38489 [details]
authorized values on second test

I added a 0 with no description
Comment 8 Nicole C. Engard 2015-04-24 14:40:56 UTC
Created attachment 38490 [details]
withdrawn cataloging

with the 0 value I get a 0 in my withdrawn pull down when cataloging now ...
Comment 9 Nicole C. Engard 2015-04-24 14:41:53 UTC
Created attachment 38491 [details]
limit to withdrawn with patch

With the patch when I limit to withdrawn I get a 1 instead of the word 'withdrawn'
Comment 10 Mark Tompsett 2015-04-24 14:44:58 UTC Comment hidden (obsolete)
Comment 11 Mark Tompsett 2015-04-24 15:10:04 UTC
I'm doing a fresh base install to see if I can replicate your failures, because I can't on my current system.
Comment 12 Mark Tompsett 2015-04-25 03:52:53 UTC
Painfully, I redid a fresh install on Ubuntu 14.04 LTS a full git install from scratch. I ran it without the patch Withdrawn = 0 in the table (as is all the fields beside Withdrawn). I then ran it with the patch. Everything was still 0. I then checked my authorised values, and there was no 0, so I added it 'Not Withdrawn'. Re-ran, and 'Not Withdrawn' is displayed now. I figured I'd check it out. Then re-run, I got a nice yellow warning telling me it checked it back in. So, I re-ran it again, and got 'Not Withdrawn'. Nicole, I think your settings are a-typical or something. I'm going to put this back to 'Needs Signoff' and perhaps someone else with be able to duplicate the issue with the...

test plan in comment #10.
Comment 13 Marc Véron 2015-04-25 08:58:31 UTC Comment hidden (obsolete)
Comment 14 Kyle M Hall 2015-05-01 12:46:37 UTC
Created attachment 38735 [details] [review]
[PASSED QA] Bug 14061: Fix broken mapping for not withdrawn items.

TEST PLAN
---------
1) Check what values to have entered for WITHDRAWN
   authorized values
   (Home -> Koha Administration -> Authorized values
    change dropdown to WITHDRAWN)
2) Add a new authorized value of 0 () if one is missing.
3) Add a new authorized value of 1 (Withdrawn) if one is missing.
4) Run inventory on a filtered set such that the
   selected barcode is not withdrawn.
   (Home -> Tools -> Inventory/stocktaking)
   -- the Withdrawn column displays '0'.
5) Run inventory on a filtered set such that the
   selected barcode is withdrawn.
   -- the Withdrawn column displays '1'.
6) Apply patch
7) Rerun steps 4 & 5
   -- the Withdrawn column displays the descriptions
      as seen in steps 1-3.
8) run koha qa test tools

Followed test plan #1-#7. Aut. value for 0 set to: 'No' amd 1: "withdrawn'. Works as expected.
Signed-off-by: Marc Veron <veron@veron.ch>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 15 Mark Tompsett 2015-05-07 05:54:43 UTC
Because Bug 14057 was pushed to master, this bug is invalid.