[Bug 12583] New: DelItem takes $dbh in parameter
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12583 Bug ID: 12583 Summary: DelItem takes $dbh in parameter Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: jonathan.druart@biblibre.com QA Contact: testopia@bugs.koha-community.org Since C4::Context->dbh shares the DB handler, it's useless to pass it to routines. On the way, It would be great to pass the itemnumber for removing an item (the biblionumber should be optional). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12583 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|gmcharlt@gmail.com |jonathan.druart@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12583 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12583 --- Comment #1 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 29746 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29746&action=edit Bug 12583: DelItem prototype - Remove $dbh Since C4::Context->dbh shares the DB handler, it's useless to pass it to routines. Test plan: Try to remove an item from the Koha interface. Verify that unit tests pass. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12583 --- Comment #2 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 29747 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29747&action=edit Bug 12583: DelItem prototype - prefer hashref To delete an item, only the itemnumber should be mandatory. The DelItem routine can retrieve the biblionumber from the itemnumber. Test plan: Verify that t/db_dependent/Items/DelItem.t passes -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12583 --- Comment #3 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 29748 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29748&action=edit Bug 12583: DelItem prototype - Add unit tests DelItem should return 1 if the item has been deleted, otherwise 0. Test plan: Verify that t/db_dependent/Items/DelItem.t returns green -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12583 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |12555 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12583 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12583 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29746|0 |1 is obsolete| | --- Comment #4 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 30053 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30053&action=edit Bug 12583: DelItem prototype - Remove $dbh Since C4::Context->dbh shares the DB handler, it's useless to pass it to routines. Test plan: Try to remove an item from the Koha interface. Verify that unit tests pass. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12583 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29747|0 |1 is obsolete| | --- Comment #5 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 30054 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30054&action=edit Bug 12583: DelItem prototype - prefer hashref To delete an item, only the itemnumber should be mandatory. The DelItem routine can retrieve the biblionumber from the itemnumber. Test plan: Verify that t/db_dependent/Items/DelItem.t passes Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12583 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29748|0 |1 is obsolete| | --- Comment #6 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 30055 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30055&action=edit Bug 12583: DelItem prototype - Add unit tests DelItem should return 1 if the item has been deleted, otherwise 0. Test plan: Verify that t/db_dependent/Items/DelItem.t returns green Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12583 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12583 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30053|0 |1 is obsolete| | Attachment #30054|0 |1 is obsolete| | Attachment #30055|0 |1 is obsolete| | --- Comment #7 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 30110 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30110&action=edit [PASSED QA] Bug 12583: DelItem prototype - Remove $dbh Since C4::Context->dbh shares the DB handler, it's useless to pass it to routines. Test plan: Try to remove an item from the Koha interface. Verify that unit tests pass. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12583 --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 30111 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30111&action=edit [PASSED QA] Bug 12583: DelItem prototype - prefer hashref To delete an item, only the itemnumber should be mandatory. The DelItem routine can retrieve the biblionumber from the itemnumber. Test plan: Verify that t/db_dependent/Items/DelItem.t passes Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12583 --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 30112 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30112&action=edit [PASSED QA] Bug 12583: DelItem prototype - Add unit tests DelItem should return 1 if the item has been deleted, otherwise 0. Test plan: Verify that t/db_dependent/Items/DelItem.t returns green Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12583 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com --- Comment #10 from Kyle M Hall <kyle@bywatersolutions.com> --- Looks great! We should do this for DelItemCheck as well. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12583 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patches pushed to master. Thanks Jonathan! P.S. I renamed the unit tests file. I'll propose a discussion on naming schemas and arrangement. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12583 mathieu saby <mathsabypro@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mathsabypro@gmail.com See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=10869 --- Comment #12 from mathieu saby <mathsabypro@gmail.com> --- See also Bug 10869, in which I first removed the useless parameter in DelOrder as did Jonathan, but changed my mind after a comment by M de Rooy. "Just a *dumb* question: Why remove the biblio parameter and look it up in the database if you already had it in the first place?" Mathieu Saby -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12583 --- Comment #13 from mathieu saby <mathsabypro@gmail.com> --- Sorry, I'm confused. Your patch was about biblionumber beeing passed to DelItem, mine was about biblionumber beeing passed to DelOrder... Mathieu -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12583 mathieu saby <mathsabypro@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also|http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=10869 | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org