[Koha-bugs] [Bug 20623] PDF export of a basket group fails when an item has an itemtype that is not in the itemtype table

2018-10-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20623

Martin Renvoize  changed:

   What|Removed |Added

 Status|Pushed to Stable|RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20623] PDF export of a basket group fails when an item has an itemtype that is not in the itemtype table

2018-08-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20623

Jonathan Druart  changed:

   What|Removed |Added

   See Also||https://bugs.koha-community
   ||.org/bugzilla3/show_bug.cgi
   ||?id=21150

--- Comment #17 from Jonathan Druart  
---
See bug 21150

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20623] PDF export of a basket group fails when an item has an itemtype that is not in the itemtype table

2018-08-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20623

--- Comment #16 from Victor Grousset/tuxayo  ---
To help anyone having a similar problem to check if there are affected of not:

error message:

Can't call method "description" on an undefined value at
/home/koha/src/acqui/basketgroup.pl line 199.



Comparing the itemtypes table content with the actually used itemtypes
(to check if there are used ones that aren't in the itemtypes table)

SELECT itemtype FROM itemtypes;
SELECT DISTINCT itemtype from biblioitems;

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20623] PDF export of a basket group fails when an item has an itemtype that is not in the itemtype table

2018-08-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20623

Fridolin SOMERS  changed:

   What|Removed |Added

 CC||fridolin.som...@biblibre.co
   ||m

--- Comment #15 from Fridolin SOMERS  ---
Pushed to 17.11.x for v17.11.09

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20623] PDF export of a basket group fails when an item has an itemtype that is not in the itemtype table

2018-07-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20623

Martin Renvoize  changed:

   What|Removed |Added

 CC||martin.renvoize@ptfs-europe
   ||.com
 Status|Pushed to Master|Pushed to Stable

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20623] PDF export of a basket group fails when an item has an itemtype that is not in the itemtype table

2018-05-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20623

Jonathan Druart  changed:

   What|Removed |Added

   Keywords|rel_18_05_candidate |

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20623] PDF export of a basket group fails when an item has an itemtype that is not in the itemtype table

2018-05-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20623

Jonathan Druart  changed:

   What|Removed |Added

 Status|Passed QA   |Pushed to Master

--- Comment #14 from Jonathan Druart  
---
Pushed to master for 18.05, thanks to everybody involved!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20623] PDF export of a basket group fails when an item has an itemtype that is not in the itemtype table

2018-05-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20623

--- Comment #13 from Victor Grousset/tuxayo  ---
Created attachment 75273
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75273=edit
Bug 20623: (QA follow-up) avoid fetch() calls in some cases

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20623] PDF export of a basket group fails when an item has an itemtype that is not in the itemtype table

2018-05-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20623

Victor Grousset/tuxayo  changed:

   What|Removed |Added

 Status|Failed QA   |Passed QA

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20623] PDF export of a basket group fails when an item has an itemtype that is not in the itemtype table

2018-05-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20623

--- Comment #12 from Jonathan Druart  
---
I pushed these 2 patches by mistake.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20623] PDF export of a basket group fails when an item has an itemtype that is not in the itemtype table

2018-05-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20623

Jonathan Druart  changed:

   What|Removed |Added

   Keywords||rel_18_05_candidate

--- Comment #11 from Jonathan Druart  
---
Please fix ASAP, I'd like to push it very soon.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20623] PDF export of a basket group fails when an item has an itemtype that is not in the itemtype table

2018-05-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20623

Jonathan Druart  changed:

   What|Removed |Added

 Status|Passed QA   |Failed QA

--- Comment #10 from Jonathan Druart  
---
We could avoid the fetch in some cases.
Maybe more:
  my $itemtype = ( $ord->{itemtype} and $biblioitem->itemtype )
? Koha::ItemTypes->find( $biblioitem->itemtype )
: undef;

  $ord->{itemtype} = $itemtype ? $itemtype->description : undef;

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20623] PDF export of a basket group fails when an item has an itemtype that is not in the itemtype table

2018-05-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20623

Marcel de Rooy  changed:

   What|Removed |Added

 CC||m.de.r...@rijksmuseum.nl
 QA Contact|testo...@bugs.koha-communit |m.de.r...@rijksmuseum.nl
   |y.org   |

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20623] PDF export of a basket group fails when an item has an itemtype that is not in the itemtype table

2018-05-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20623

Marcel de Rooy  changed:

   What|Removed |Added

 Status|Signed Off  |Passed QA

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20623] PDF export of a basket group fails when an item has an itemtype that is not in the itemtype table

2018-05-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20623

Marcel de Rooy  changed:

   What|Removed |Added

  Attachment #74913|0   |1
is obsolete||
  Attachment #75225|0   |1
is obsolete||

--- Comment #8 from Marcel de Rooy  ---
Created attachment 75263
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75263=edit
Bug 20623: Fix basket group PDF when itemtype not itemtype table

When an item has an itemtype not in the itemtype table. Trying to fetch
it's description lead to an error.
Using authorized values like ccode to populate the itemtypes of the
biblioitems (instead of the itemtype table) can lead to such data.
Or importing records with invalid itemtype codes. Koha doesn't do enough
checks at import to at least warn about these issues.

== Test plan ==
1. first we need an item with an itype not in the item_types table
   1. download a record as MARCXML
   2. find it's item type in administration; and the related code
   3. open the MARCXML file and search for occurences of the code
and replace them by some non-existing value like "FOOBAR"
   4. also change the barcode so it won't be ignored because
it's a duplicate
   5. also change the title to easily find it later in the search
   6. tools → "Stage MARC records for import"
   7. upload your file
   8. "stage for import"
   9. click "Manage staged records"
You should end on the page related to your staged record
   10. "Import this batch into the catalog"

2. now we need it in a basket group
   1. have/create a active budget
   2. have/create a fund
   3. have/create a vendor with minimal info
   4. create a basket with minimal info
   5. add our imported item to the basket
for example search it by name
   6. go to the basket. URL should be
  /cgi-bin/koha/acqui/basket.pl?basketno=X
   7. close this basket
and tick "Attach this basket to a new basket group with the same name"
   8. you will end up in the basket groups lists
   9. go to the "closed" tab
   11. go to the basket group
  your vendor page => Basket groups => Closed

3. export as PDF, it should fail (internal server error)
 this is the bug (no kidding ^_^)
4. apply this patch
5. reexport the basket as PDF
6. it should work
7. create an item type (in administration)
 that has the same code as the one that you put in the MARCXML
8. reexport the basket as PDF
9. check that in the PDF that the description is here:
 table at the bottom of the document → "Document" column

Signed-off-by: Owen Leonard 

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 20623] PDF export of a basket group fails when an item has an itemtype that is not in the itemtype table

2018-05-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20623

--- Comment #9 from Marcel de Rooy  ---
Created attachment 75264
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75264=edit
Bug 20623: (QA follow-up) Remove one find call

Imo these somewhat weird lines ask for improvement, but I don't want to change
the exact conditions here. Just removing the need to call find twice.

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20623] PDF export of a basket group fails when an item has an itemtype that is not in the itemtype table

2018-05-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20623

--- Comment #7 from Owen Leonard  ---
Created attachment 75225
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75225=edit
Bug 20623: Fix basket group PDF when itemtype not itemtype table

When an item has an itemtype not in the itemtype table. Trying to fetch
it's description lead to an error.
Using authorized values like ccode to populate the itemtypes of the
biblioitems (instead of the itemtype table) can lead to such data.
Or importing records with invalid itemtype codes. Koha doesn't do enough
checks at import to at least warn about these issues.

== Test plan ==
1. first we need an item with an itype not in the item_types table
   1. download a record as MARCXML
   2. find it's item type in administration; and the related code
   3. open the MARCXML file and search for occurences of the code
and replace them by some non-existing value like "FOOBAR"
   4. also change the barcode so it won't be ignored because
it's a duplicate
   5. also change the title to easily find it later in the search
   6. tools → "Stage MARC records for import"
   7. upload your file
   8. "stage for import"
   9. click "Manage staged records"
You should end on the page related to your staged record
   10. "Import this batch into the catalog"

2. now we need it in a basket group
   1. have/create a active budget
   2. have/create a fund
   3. have/create a vendor with minimal info
   4. create a basket with minimal info
   5. add our imported item to the basket
for example search it by name
   6. go to the basket. URL should be
  /cgi-bin/koha/acqui/basket.pl?basketno=X
   7. close this basket
and tick "Attach this basket to a new basket group with the same name"
   8. you will end up in the basket groups lists
   9. go to the "closed" tab
   11. go to the basket group
  your vendor page => Basket groups => Closed

3. export as PDF, it should fail (internal server error)
 this is the bug (no kidding ^_^)
4. apply this patch
5. reexport the basket as PDF
6. it should work
7. create an item type (in administration)
 that has the same code as the one that you put in the MARCXML
8. reexport the basket as PDF
9. check that in the PDF that the description is here:
 table at the bottom of the document → "Document" column

Signed-off-by: Owen Leonard 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 20623] PDF export of a basket group fails when an item has an itemtype that is not in the itemtype table

2018-05-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20623

Owen Leonard  changed:

   What|Removed |Added

   Patch complexity|--- |Small patch
 Status|Needs Signoff   |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20623] PDF export of a basket group fails when an item has an itemtype that is not in the itemtype table

2018-04-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20623

--- Comment #6 from Victor Grousset/tuxayo  ---
oleonard:
> Catalogers here do some cataloging outside of Koha and then import records.
> If they have made a typo when entering the item type or collection code
> an error could get in that way.

> [...]

> The catalogers stage and import files of MARC records

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20623] PDF export of a basket group fails when an item has an itemtype that is not in the itemtype table

2018-04-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20623

Victor Grousset/tuxayo  changed:

   What|Removed |Added

 Status|ASSIGNED|Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20623] PDF export of a basket group fails when an item has an itemtype that is not in the itemtype table

2018-04-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20623

Victor Grousset/tuxayo  changed:

   What|Removed |Added

  Attachment #74605|0   |1
is obsolete||

--- Comment #5 from Victor Grousset/tuxayo  ---
Created attachment 74913
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=74913=edit
Bug 20623 : Fix basket group PDF when itemtype not itemtype table

When an item has an itemtype not in the itemtype table. Trying to fetch
it's description lead to an error.
Using authorized values like ccode to populate the itemtypes of the
biblioitems (instead of the itemtype table) can lead to such data.
Or importing records with invalid itemtype codes. Koha doesn't do enough
checks at import to at least warn about these issues.

== Test plan ==
1. first we need an item with an itype not in the item_types table
   1. download a record as MARCXML
   2. find it's item type in administration; and the related code
   3. open the MARCXML file and search for occurences of the code
and replace them by some non-existing value like "FOOBAR"
   4. also change the barcode so it won't be ignored because
it's a duplicate
   5. also change the title to easily find it later in the search
   6. tools → "Stage MARC records for import"
   7. upload your file
   8. "stage for import"
   9. click "Manage staged records"
You should end on the page related to your staged record
   10. "Import this batch into the catalog"

2. now we need it in a basket group
   1. have/create a active budget
   2. have/create a fund
   3. have/create a vendor with minimal info
   4. create a basket with minimal info
   5. add our imported item to the basket
for example search it by name
   6. go to the basket. URL should be
  /cgi-bin/koha/acqui/basket.pl?basketno=X
   7. close this basket
and tick "Attach this basket to a new basket group with the same name"
   8. you will end up in the basket groups lists
   9. go to the "closed" tab
   11. go to the basket group
  your vendor page => Basket groups => Closed

3. export as PDF, it should fail (internal server error)
 this is the bug (no kidding ^_^)
4. apply this patch
5. reexport the basket as PDF
6. it should work
7. create an item type (in administration)
 that has the same code as the one that you put in the MARCXML
8. reexport the basket as PDF
9. check that in the PDF that the description is here:
 table at the bottom of the document → "Document" column

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 20623] PDF export of a basket group fails when an item has an itemtype that is not in the itemtype table

2018-04-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20623

Victor Grousset/tuxayo  changed:

   What|Removed |Added

 Status|Needs Signoff   |ASSIGNED

--- Comment #4 from Victor Grousset/tuxayo  ---
TODO: find a realistic test plan.

After discussing with Jonathan on IRC, I need to provide a test plan that shows
that it's not only a migration issue.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20623] PDF export of a basket group fails when an item has an itemtype that is not in the itemtype table

2018-04-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20623

Jonathan Druart  changed:

   What|Removed |Added

 CC||jonathan.dru...@bugs.koha-c
   ||ommunity.org

--- Comment #3 from Jonathan Druart  
---
This is due to migration issue, see this thread:
http://koha.1045719.n5.nabble.com/Expected-behaviour-if-itemtype-does-not-exist-td5939989.html

It would be better to add a warning on the about page about data inconsistency.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20623] PDF export of a basket group fails when an item has an itemtype that is not in the itemtype table

2018-04-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20623

Victor Grousset/tuxayo  changed:

   What|Removed |Added

  Attachment #74604|0   |1
is obsolete||

--- Comment #2 from Victor Grousset/tuxayo  ---
Created attachment 74605
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=74605=edit
Bug 20623 : Fix basket group PDF when itemtype not itemtype table

When an item has an itemtype not in the itemtype table. Trying to fetch
it's description lead to an error.
Using authorized values like ccode to populate the itemtypes of the
biblioitems (instead of the itemtype table) can lead to such data.
Or importing records with invalid itemtype codes. Koha doesn't do enough
checks at import to at least warn about these issues.

== Test plan ==
1. have/create a budget
2. have/create a fund
3. have/create a vendor with minimal info
4. create a basket with minimal info
5. add a item to the basket
6. go to the basket. URL should be
   /cgi-bin/koha/acqui/basket.pl?basketno=X
7. close this basket
8. create a basket group with the basket
   - your vendor page => Basket groups
   - create basket group
   - (tick the "close this basket group" check box)
9. go to the basket group
  your vendor page => Basket groups => Closed
10. export as PDF, it should work, keep the page opened
11. find the itemtype code of item in the basket
12. delete it with the following SQL[1] (directly or use sql reports)
  replace with the relevant type code
  DELETE from itemtypes where itemtype = "BOOK";
13. reexport the basket as PDF
14. it should fail (internal server error)
  this is the bug (no kidding ^^)
15. apply this patch
16. reexport the basket as PDF
17. it should work
18. create an item type (in administration)
  that has the same code as the deleted one
19. reexport the basket as PDF
20. check that in the PDF that the description is here:
  table at the bottom of the document → "Document" column

[1] Or you can find a more realistic way to have a biblioitem whose itemtype is
not in the itemtype table

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 20623] PDF export of a basket group fails when an item has an itemtype that is not in the itemtype table

2018-04-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20623

Victor Grousset/tuxayo  changed:

   What|Removed |Added

 Status|ASSIGNED|Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20623] PDF export of a basket group fails when an item has an itemtype that is not in the itemtype table

2018-04-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20623

--- Comment #1 from Victor Grousset/tuxayo  ---
Created attachment 74604
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=74604=edit
Bug 20623 : Fix basket group PDF when itemtype not itemtype table

When an item has an itemtype not in the itemtype table. Trying to fetch
it's description lead to an error.
Using authorized values like ccode to populate the itemtypes of the
biblioitems (instead of the itemtype table) can lead to such data.
Or importing records with invalid itemtype codes. Koha doesn't do enough
checks at import to at least warn about these issues.

== Test plan ==
1. have/create a budget
2. have/create a fund
3. have/create a vendor with minimal info
4. create a basket with minimal info
5. add a item to the basket
6. go to the basket. URL should be
   /cgi-bin/koha/acqui/basket.pl?basketno=X
7. close this basket
8. create a basket group with the basket
   - your vendor page => Basket groups
   - create basket group
   - (tick the "close this basket group" check box)
9. go to the basket group
  your vendor page => Basket groups => Closed
10. export as PDF, it should work, keep the page opened
11. find the itemtype code of item in the basket
12. delete it with the following SQL[1] (directly or use sql reports)
  replace with the relevant type code
  DELETE from itemtypes where itemtype = "BOOK";
13. reexport the basket as PDF
14. it should fail (internal server error)
  this is the bug (no kidding ^^)
15. apply this patch
16. reexport the basket as PDF
17. it should work
18. create an item type (in administration)
  that has the same code as the deleted one
19. reexport the basket as PDF
20. check that in the PDF that the description is here:
  table at the bottom of the document → "Document" column

[1] Or you can find a more realistic way to have a biblioitem whose itemtype is
not in the itemtype table

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 20623] PDF export of a basket group fails when an item has an itemtype that is not in the itemtype table

2018-04-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20623

Victor Grousset/tuxayo  changed:

   What|Removed |Added

Summary|PDF export of a basket  |PDF export of a basket
   |group fails when an item|group fails when an item
   |has an itemtype is not in   |has an itemtype that is not
   |the itemtype table  |in the itemtype table

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/