Bug 17094

Summary: Methods of Koha::Object[s]-based classed should not return DBIx::Class objects
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: aleisha, brendan
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 17091    
Bug Blocks: 17249    
Attachments: Bug 17094: Add delete to the Koha::Objects AUTOLOAD method
Bug 17094: Make Koha::Virtualshelf methods return Koha::Objects-based objects
[SIGNED-OFF] Bug 17094: Add delete to the Koha::Objects AUTOLOAD method
[SIGNED-OFF] Bug 17094: Make Koha::Virtualshelf methods return Koha::Objects-based objects
[PASSED QA] Bug 17094: Make Koha::Virtualshelf methods return Koha::Objects-based objects

Description Jonathan Druart 2016-08-09 16:12:15 UTC
For instance the 2 methods get_shares and get_contents from Koha::Virtualshelf return DBIx::Class objects instead of Koha::Virtualshelfshares and Koha::Virtualshelfcontents objects.
Comment 1 Jonathan Druart 2016-08-09 16:52:07 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2016-08-09 16:52:10 UTC Comment hidden (obsolete)
Comment 3 Aleisha Amohia 2016-08-23 01:39:47 UTC
fatal: sha1 information is lacking or useless (Koha/Objects.pm).
Comment 4 Jonathan Druart 2016-08-23 10:03:30 UTC
(In reply to Aleisha Amohia from comment #3)
> fatal: sha1 information is lacking or useless (Koha/Objects.pm).

Did you apply all the dependencies?
Comment 5 Aleisha Amohia 2016-08-23 23:42:44 UTC Comment hidden (obsolete)
Comment 6 Aleisha Amohia 2016-08-23 23:43:37 UTC
Created attachment 54796 [details] [review]
[SIGNED-OFF] Bug 17094: Make Koha::Virtualshelf methods return Koha::Objects-based objects

Instead of DBIx::Class objects.

Test plan:
1/ Add content to a list and share it with another patron
2/ Try to view the list with the other patron
3/ download and send a shelf and check if the biblio list is correct
4/ prove t/db_dependent/Virtualshelves.t should return green

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Comment 7 Jonathan Druart 2016-09-08 18:18:33 UTC
Comment on attachment 54795 [details] [review]
[SIGNED-OFF] Bug 17094: Add delete to the Koha::Objects AUTOLOAD method

Moved to bug 17091
Comment 8 Martin Renvoize 2016-10-13 10:54:59 UTC
Created attachment 56345 [details] [review]
[PASSED QA] Bug 17094: Make Koha::Virtualshelf methods return Koha::Objects-based objects

Instead of DBIx::Class objects.

Test plan:
1/ Add content to a list and share it with another patron
2/ Try to view the list with the other patron
3/ download and send a shelf and check if the biblio list is correct
4/ prove t/db_dependent/Virtualshelves.t should return green

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 9 Brendan Gallagher 2016-10-13 15:25:50 UTC
Pushed to Master - Should be in the November 16.11 Release.  Thanks!