Bug 2806

Summary: issuingbranch isn't used
Product: Koha Reporter: Nicole C. Engard <nengard>
Component: DatabaseAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: normal    
Priority: P3 CC: bgkriegel, jonathan.druart, oleonard, tomascohen, wizzyrea
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 2806: Remove issuingbranch columns
[SIGNED-OFF] Bug 2806: Remove issuingbranch columns
[PASSED QA] Bug 2806: Remove issuingbranch columns

Description Chris Cormack 2010-05-21 00:56:38 UTC


---- Reported by nengard@gmail.com 2008-11-18 07:42:19 ----

In the issues and old_issues table, the issuingbranch field isn't being populated.

[10:13]  <rch> issuingbranch isn't used...
[10:13]  <rch> INSERT INTO issues (borrowernumber, itemnumber,issuedate, date_due, branchcode)
[10:17]  <acmoore> rch: if we're not populating the issuingbranch, that should probably be recorded as a bug. Dontcha think?
[10:19]  <rch> nengard: yes, i do.  
[10:19]  <rch> we do record it, in the statistics table, but i agree it should be in the issues table, and don't understand why it's not.
[10:20]  <acmoore> ah. OK, well maybe the bug is that there's an extra field in the issues table. If there's no broken functionality, I guess I wouldn't report anything.
[10:33]  <nengard> acmoore, rch should i report that bug or did you?
[10:38]  <rch> nengard: not me.  i do think the data should be in the issues table.  there are other extra columns in the issues table as well.



---- Additional Comments From mason@kohaaloha.com 2009-03-24 21:19:54 ----

(In reply to comment #0)
> In the issues and old_issues table, the issuingbranch field isn't being
> populated.
> 
> [10:13]  <rch> issuingbranch isn't used...
> [10:13]  <rch> INSERT INTO issues (borrowernumber, itemnumber,issuedate,
> date_due, branchcode)
> [10:17]  <acmoore> rch: if we're not populating the issuingbranch, that should
> probably be recorded as a bug. Dontcha think?
> [10:19]  <rch> nengard: yes, i do.  
> [10:19]  <rch> we do record it, in the statistics table, but i agree it should
> be in the issues table, and don't understand why it's not.
> [10:20]  <acmoore> ah. OK, well maybe the bug is that there's an extra field in
> the issues table. If there's no broken functionality, I guess I wouldn't report
> anything.
> [10:33]  <nengard> acmoore, rch should i report that bug or did you?
> [10:38]  <rch> nengard: not me.  i do think the data should be in the issues
> table.  there are other extra columns in the issues table as well.
> 

i just bumped into this bug too

so the issue here (no pun inteneded ;) is that the issues.issuingbranch column is unneeded?, as the issuing branch info is currently stored in the issues.branchcode column.

so... the fix for this is to remove issues.issuingbranch from koha-struct.sql and a patch to remove the column - in updatedatabase.pl ?

(and possibly to fix some misc. reports and templates that may refer to it too...)

comments anyone?



---- Additional Comments From nengard@gmail.com 2009-03-25 14:08:02 ----

As I said before - I do think that this info should be in the issues table. Also I think Ryan is saying that it should be populated.  I think the branchcode field is the home branch - not the issuing branch.  Correct me if I'm wrong.



---- Additional Comments From oleonard@myacpl.org 2010-05-19 13:51:52 ----

In my tests the value saved in issues.branchcode is the issuing branch, whether it is specifically recording the branch at which it is being checked out or it is recording the new holdingbranch value for the item now that it has been checked out from that branch. I'd like to see someone trace the data all the way through the transaction to confirm what's going on. If my tests are correct, the issuingbranch column is redundant.



--- Bug imported by chris@bigballofwax.co.nz 2010-05-21 00:56 UTC  ---

This bug was previously known as _bug_ 2806 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=2806

Actual time not defined. Setting to 0.0
CC member mason@kohaaloha.com does not have an account here

Comment 1 Liz Rea 2012-05-02 16:13:05 UTC
Owen is correct, the issuingbranch is being recorded as the holding branch (items.branchcode).

Which still leaves the question, populate issuingbranch or just depend on items.branchcode and remove issuingbranch?
Comment 2 Owen Leonard 2013-08-08 13:30:27 UTC
(In reply to Liz Rea from comment #1)

> Which still leaves the question, populate issuingbranch or just depend on
> items.branchcode and remove issuingbranch?

Since items.branchcode is updated with the branchcode of the issuing branch, and then issues.branchcode is updated with the same value, what is the point of having a second field, issues.issuingbranch?
Comment 3 Jonathan Druart 2015-02-23 15:42:30 UTC Comment hidden (obsolete)
Comment 4 Bernardo Gonzalez Kriegel 2015-03-04 15:29:28 UTC Comment hidden (obsolete)
Comment 5 Katrin Fischer 2015-03-05 11:04:52 UTC
Created attachment 36559 [details] [review]
[PASSED QA] Bug 2806: Remove issuingbranch columns

This column is not in used in the Koha code and could be removed.

Test plan:
Verify the branch is correctly displayed on the circulation history
(members/readingrec.pl) and that both reports Most-cisulated items
(cat_issues_top.pl) and Avg checkout (issues_avg_stats.pl) work as
before.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No problems found.
Fixed wrong table name on updatedatabase.pl and a tab char.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and QA script.
Checked issues and returns are still working correctly.
There is no mention of issuingbranch in the codebase.
Comment 6 Tomás Cohen Arazi (tcohen) 2015-04-13 13:39:38 UTC
Patch pushed to master.

Thanks Jonathan!