Bug 11010 - Useless column purchaseordernumber in aqorders table
Summary: Useless column purchaseordernumber in aqorders table
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Database (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Galen Charlton
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-07 15:43 UTC by Mathieu Saby
Modified: 2024-02-06 13:28 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mathieu Saby 2013-10-07 15:43:08 UTC
In Schemaspy, column purchaseordernumber is reported as "not used? always NULL".
"grep -r cancelledby *" give this result : 

C4/Acquisition.pm:The following keys are used: "biblionumber", "title", "basketno", "quantity", "notes", "rrp", "ecost", "gstrate", "unitprice", "subscription", "sort1", "sort2", "booksellerinvoicenumber", "listprice", "budgetdate", "purchaseordernumber", "branchcode", "booksellerinvoicenumber", "budget_id".
C4/Acquisition.pm:                datereceived,purchaseordernumber,
installer/data/mysql/update22to30.pl:                field   => 'purchaseordernumber',
installer/data/mysql/kohastructure.sql:  `purchaseordernumber` mediumtext, -- not used? always NULL
installer/data/Pg/kohastructure.sql:purchaseordernumber text,
t/db_dependent/Acquisition.t:                         purchaseordernumber


In C4::Acquisition.pm::GetParcels, the SELECT statement retreives purchaseordernumber, but no value is pushed to that column in any part of Koha's code. So I think it is useless.

I propose the deletion of this column.

M. Saby
Comment 1 Colin Campbell 2013-10-07 16:26:16 UTC
There is a patch on bug 4456 to utilize this field. see also bug 4960
Comment 2 Mathieu Saby 2013-10-07 17:20:59 UTC
Thank you.
4456 is very old, and there is nothing attached to 4456.
Do you think these enh could be "revived" ?
What's the difference between the ordernumber and the purchaseordernumber?

M. Saby
Comment 3 Mathieu Saby 2013-10-07 17:21:43 UTC
oups, the patch attached to 4456 is not very old, sorry for that.

M. Saby
Comment 4 Jonathan Druart 2014-07-18 10:32:12 UTC
Since bug 4456 will use this field, this bug report is invalid.
Comment 5 Marcel de Rooy 2024-02-06 13:28:12 UTC
(In reply to Jonathan Druart from comment #4)
> Since bug 4456 will use this field, this bug report is invalid.

Bug 4456 died prematurely. I opened 36002 to resurrect removal of this confusing column.