Bug 18460 - Remove itemtype-related Serials.t warnings
Summary: Remove itemtype-related Serials.t warnings
Status: Pushed to Stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Galen Charlton
URL:
Whiteboard:
Keywords:
Depends on: 14598
Blocks:
  Show dependency treegraph
 
Reported: 2017-04-19 15:15 UTC by Tomás Cohen Arazi
Modified: 2017-05-10 09:55 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 18460: Fix undefined itemtype warning in Serials.t (3.35 KB, patch)
2017-04-19 15:20 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 18460: Fix undefined itemtype warning in Serials.t (3.48 KB, patch)
2017-04-19 18:11 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 18460: Fix undefined itemtype warning in Serials.t (3.50 KB, patch)
2017-04-19 18:40 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi 2017-04-19 15:15:39 UTC
To reproduce:
- Run:
  $ prove t/db_dependent/Serials.t
=> FAIL: item-level_itypes set... warning
Comment 1 Tomás Cohen Arazi 2017-04-19 15:20:44 UTC
Created attachment 62391 [details] [review]
Bug 18460: Fix undefined itemtype warning in Serials.t

This patch makes the test create an itemtype, and use it for the created item so there's no warning.

To test:
- Run:
  $ prove t/db_dependent/Serials.t
=> FAIL: item-level_itypes set but no itemtype set... warning raised
- Apply the patch
- Run:
  $ prove t/db_dependent/Serials.t
=> SUCCESS: Tests pass and no warning is raised
- Sign off :-D

https://bugs.koha-community.org/show_bug.cgi?id=18361
Comment 2 Marc Véron 2017-04-19 18:10:46 UTC
Ok, reproduced on minimal install:

prove -v t/db_dependent/Serials.t
(...)
item-level_itypes set but no itemtype set for item (5) at /home/marc/koha/Koha/Schema/Result/Item.pm line 698.
(...)

Does no longer appear with patch applied.
Comment 3 Marc Véron 2017-04-19 18:11:46 UTC
Created attachment 62406 [details] [review]
Bug 18460: Fix undefined itemtype warning in Serials.t

This patch makes the test create an itemtype, and use it for the created item so there's no warning.

To test:
- Run:
  $ prove t/db_dependent/Serials.t
=> FAIL: item-level_itypes set but no itemtype set... warning raised
- Apply the patch
- Run:
  $ prove t/db_dependent/Serials.t
=> SUCCESS: Tests pass and no warning is raised
- Sign off :-D

https://bugs.koha-community.org/show_bug.cgi?id=18361

Signed-off-by: Marc Véron <veron@veron.ch>
Comment 4 Jonathan Druart 2017-04-19 18:40:02 UTC
Created attachment 62411 [details] [review]
Bug 18460: Fix undefined itemtype warning in Serials.t

This patch makes the test create an itemtype, and use it for the created item so there's no warning.

To test:
- Run:
  $ prove t/db_dependent/Serials.t
=> FAIL: item-level_itypes set but no itemtype set... warning raised
- Apply the patch
- Run:
  $ prove t/db_dependent/Serials.t
=> SUCCESS: Tests pass and no warning is raised
- Sign off :-D

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 5 Kyle M Hall 2017-04-21 14:31:38 UTC
Pushed to master for 17.05, thanks Tomas!
Comment 6 Katrin Fischer 2017-04-21 22:42:35 UTC
This patch has been pushed to 16.11.x and will be in 16.11.07.
Comment 7 Mason James 2017-05-03 04:40:10 UTC
Pushed to 16.05.x, for 16.05.12 release
Comment 8 Julian Maurice 2017-05-10 09:55:39 UTC
Pushed to 3.22.x for 3.22.21