[Bug 15084] New: Move the currency related code to Koha::Cities
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 Bug ID: 15084 Summary: Move the currency related code to Koha::Cities Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |15083 Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15083 [Bug 15083] acqui/currency.pl is unused -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Move the currency related |Move the currency related |code to Koha::Cities |code to | |Koha::Currenc[y|ies] -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Move the currency related |Move the currency related |code to |code to |Koha::Currenc[y|ies] |Koha::Acquisition::Currenc[ | |y|ies] -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=15084 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 44162 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44162&action=edit Bug 15084: Add Koha::Acquisition::Currenc[y|ies] classes The first step of this patch set is to move the business logic code from admin/currencies.pl to Koha::Acquisition::Currenc[y|ies]. Then a foreign key will be created on aqorders.currency as we want to assure data integrity. Note that a aqbooksellers.currency also exists but is never used. It could be removed in another bug report. This update has to care about possible breaking relation. For instance an old order has been made using a currency which is now deleted. To be sure the update process won't break a new column currency.archived is created and leave open the door for a further improvement (marked a currency as archived from the interface: this won't be provided by this enhancement). These archived currencies won't appear on the interface for newly created items (order/suggestion). Once this is done it becomes easy to remove the subroutine from C4::Budgets: GetCurrencies and GetCurrency. ConvertCurrency will also be removed but is not used anymore. Note that none of these subroutines were covered by tests. Now they are. Test plan: 0/ Don't apply this patch 1/ Create a temporary currency and an order using it 2/ Remove the currency from your CLI 3/ Apply the patch and execute the DB entry 4/ Note that the currency is inserted and marked as archived. 5/ Edit the previous order and confirm that the correct currency is still selected. It won't never be displayed anywhere else. 6/ Test the admin script: on admin/currency.pl add/remove/edit currencies. You could not have 2 active currencies at the same time. 7/ Then on the different scripts of the acquisition module, focus on the currencies values and create a new order, receive it. Create/edit a suggestion Other changes must be checked by the QAer. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 44163 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44163&action=edit Bug 15084: Make sure the previous active currency is marked as inactive On inserting an active currency, others should be marked as inactive. We can only have 1 active currency at the same time. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 44164 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44164&action=edit Bug 15084: use Koha::Acquisition::Currenc[y|ies] in admin/currency -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 44165 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44165&action=edit Bug 15084: DB Changes - add currency.archived and FK on aqorders.currency See the comment for details. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 44166 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44166&action=edit Bug 15084: Replace C4::Budgets::GetCurrencies with Koha::Acquisition::Currencies->search Most part of the code here is unnecessary complex. We should selected the currency if it is selected, that's all :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 44167 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44167&action=edit Bug 15084: Remove C4::Budgets::ConvertCurrency This subroutine is unused and can be removed. There is no trace left of currency in C4::Budgets. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 44168 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44168&action=edit Bug 15084: Add tests for Koha::Acquisition::Currenc[y|ies] -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=14836, | |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=14828, | |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=10363, | |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=14888, | |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=14889 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=14544 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=15293 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #44162|0 |1 is obsolete| | Attachment #44163|0 |1 is obsolete| | Attachment #44164|0 |1 is obsolete| | Attachment #44165|0 |1 is obsolete| | Attachment #44166|0 |1 is obsolete| | Attachment #44167|0 |1 is obsolete| | Attachment #44168|0 |1 is obsolete| | --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 45690 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45690&action=edit Bug 15084: Add Koha::Acquisition::Currenc[y|ies] classes The first step of this patch set is to move the business logic code from admin/currencies.pl to Koha::Acquisition::Currenc[y|ies]. Then a foreign key will be created on aqorders.currency as we want to assure data integrity. Note that a aqbooksellers.currency also exists but is never used. It could be removed in another bug report. This update has to care about possible breaking relation. For instance an old order has been made using a currency which is now deleted. To be sure the update process won't break a new column currency.archived is created and leave open the door for a further improvement (marked a currency as archived from the interface: this won't be provided by this enhancement). These archived currencies won't appear on the interface for newly created items (order/suggestion). Once this is done it becomes easy to remove the subroutine from C4::Budgets: GetCurrencies and GetCurrency. ConvertCurrency will also be removed but is not used anymore. Note that none of these subroutines were covered by tests. Now they are. Test plan: 0/ Don't apply this patch 1/ Create a temporary currency and an order using it 2/ Remove the currency from your CLI 3/ Apply the patch and execute the DB entry 4/ Note that the currency is inserted and marked as archived. 5/ Edit the previous order and confirm that the correct currency is still selected. It won't never be displayed anywhere else. 6/ Test the admin script: on admin/currency.pl add/remove/edit currencies. You could not have 2 active currencies at the same time. 7/ Then on the different scripts of the acquisition module, focus on the currencies values and create a new order, receive it. Create/edit a suggestion Other changes must be checked by the QAer. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 45691 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45691&action=edit Bug 15084: Make sure the previous active currency is marked as inactive On inserting an active currency, others should be marked as inactive. We can only have 1 active currency at the same time. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 45692 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45692&action=edit Bug 15084: use Koha::Acquisition::Currenc[y|ies] in admin/currency -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 45693 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45693&action=edit Bug 15084: DB Changes - add currency.archived and FK on aqorders.currency See the comment for details. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 45694 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45694&action=edit Bug 15084: Replace C4::Budgets::GetCurrencies with Koha::Acquisition::Currencies->search Most part of the code here is unnecessary complex. We should selected the currency if it is selected, that's all :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 45695 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45695&action=edit Bug 15084: Remove C4::Budgets::ConvertCurrency This subroutine is unused and can be removed. There is no trace left of currency in C4::Budgets. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 45696 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45696&action=edit Bug 15084: Add tests for Koha::Acquisition::Currenc[y|ies] -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 --- Comment #15 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Rebased against master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=15379 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com --- Comment #16 from Josef Moravec <josef.moravec@gmail.com> --- Jonathan, there is a typo in atomic update sql file, update table aqorders set currency=NULL where currency=""; should be update aqorders set currency=NULL where currency=""; So id did the database update manually. y On the currency management page I can't see if the currency is archived (although the column in table is here) On editing previous order, I can see the right price, but in currency select dropdown there is current active currency selected. Everything else works as expected. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45693|0 |1 is obsolete| | --- Comment #17 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 45759 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45759&action=edit Bug 15084: DB Changes - add currency.archived and FK on aqorders.currency See the comment for details. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 --- Comment #18 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 45761 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45761&action=edit Bug 15084: DBIx::Class - Shema changes -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 --- Comment #19 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Josef Moravec from comment #16)
Jonathan, there is a typo in atomic update sql file,
update table aqorders set currency=NULL where currency="";
should be
update aqorders set currency=NULL where currency="";
Thanks for the catch!
On the currency management page I can't see if the currency is archived (although the column in table is here)
On editing previous order, I can see the right price, but in currency select dropdown there is current active currency selected.
This is because the Schema file ( Koha/Schema/Result/Currency.pm) was not updated. When you test a patch modifying the DB structure, make sure the schema is updated too (using misc/devel/update_dbix_class_files.pl). I have added the schema change in the last patch. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45690|0 |1 is obsolete| | --- Comment #20 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 45807 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45807&action=edit Bug 15084: Add Koha::Acquisition::Currenc[y|ies] classes The first step of this patch set is to move the business logic code from admin/currencies.pl to Koha::Acquisition::Currenc[y|ies]. Then a foreign key will be created on aqorders.currency as we want to assure data integrity. Note that a aqbooksellers.currency also exists but is never used. It could be removed in another bug report. This update has to care about possible breaking relation. For instance an old order has been made using a currency which is now deleted. To be sure the update process won't break a new column currency.archived is created and leave open the door for a further improvement (marked a currency as archived from the interface: this won't be provided by this enhancement). These archived currencies won't appear on the interface for newly created items (order/suggestion). Once this is done it becomes easy to remove the subroutine from C4::Budgets: GetCurrencies and GetCurrency. ConvertCurrency will also be removed but is not used anymore. Note that none of these subroutines were covered by tests. Now they are. Test plan: 0/ Don't apply this patch 1/ Create a temporary currency and an order using it 2/ Remove the currency from your CLI 3/ Apply the patch and execute the DB entry 4/ Note that the currency is inserted and marked as archived. 5/ Edit the previous order and confirm that the correct currency is still selected. It won't never be displayed anywhere else. 6/ Test the admin script: on admin/currency.pl add/remove/edit currencies. You could not have 2 active currencies at the same time. 7/ Then on the different scripts of the acquisition module, focus on the currencies values and create a new order, receive it. Create/edit a suggestion Other changes must be checked by the QAer. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45691|0 |1 is obsolete| | --- Comment #21 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 45808 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45808&action=edit Bug 15084: Make sure the previous active currency is marked as inactive On inserting an active currency, others should be marked as inactive. We can only have 1 active currency at the same time. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45692|0 |1 is obsolete| | --- Comment #22 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 45809 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45809&action=edit Bug 15084: use Koha::Acquisition::Currenc[y|ies] in admin/currency Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45694|0 |1 is obsolete| | --- Comment #23 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 45810 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45810&action=edit Bug 15084: Replace C4::Budgets::GetCurrencies with Koha::Acquisition::Currencies->search Most part of the code here is unnecessary complex. We should selected the currency if it is selected, that's all :) Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45695|0 |1 is obsolete| | --- Comment #24 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 45811 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45811&action=edit Bug 15084: Remove C4::Budgets::ConvertCurrency This subroutine is unused and can be removed. There is no trace left of currency in C4::Budgets. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45696|0 |1 is obsolete| | --- Comment #25 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 45812 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45812&action=edit Bug 15084: Add tests for Koha::Acquisition::Currenc[y|ies] Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45759|0 |1 is obsolete| | --- Comment #26 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 45813 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45813&action=edit Bug 15084: DB Changes - add currency.archived and FK on aqorders.currency See the comment for details. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45761|0 |1 is obsolete| | --- Comment #27 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 45814 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45814&action=edit Bug 15084: DBIx::Class - Shema changes Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 Josef Moravec <josef.moravec@gmail.com> 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=15084 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |15449 Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15449 [Bug 15449] Move stuffs to the Koha namespace -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also|http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=14836 | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also|http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=14888 | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also|http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=10363 | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also|http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=14889 | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also|http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=14828, | |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=14544, | |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=15293, | |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=15379 | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084 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=15084 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45807|0 |1 is obsolete| | Attachment #45808|0 |1 is obsolete| | Attachment #45809|0 |1 is obsolete| | Attachment #45810|0 |1 is obsolete| | Attachment #45811|0 |1 is obsolete| | Attachment #45812|0 |1 is obsolete| | Attachment #45813|0 |1 is obsolete| | Attachment #45814|0 |1 is obsolete| | --- Comment #28 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 47213 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47213&action=edit Bug 15084: Add Koha::Acquisition::Currenc[y|ies] classes The first step of this patch set is to move the business logic code from admin/currencies.pl to Koha::Acquisition::Currenc[y|ies]. Then a foreign key will be created on aqorders.currency as we want to assure data integrity. Note that a aqbooksellers.currency also exists but is never used. It could be removed in another bug report. This update has to care about possible breaking relation. For instance an old order has been made using a currency which is now deleted. To be sure the update process won't break a new column currency.archived is created and leave open the door for a further improvement (marked a currency as archived from the interface: this won't be provided by this enhancement). These archived currencies won't appear on the interface for newly created items (order/suggestion). Once this is done it becomes easy to remove the subroutine from C4::Budgets: GetCurrencies and GetCurrency. ConvertCurrency will also be removed but is not used anymore. Note that none of these subroutines were covered by tests. Now they are. Test plan: 0/ Don't apply this patch 1/ Create a temporary currency and an order using it 2/ Remove the currency from your CLI 3/ Apply the patch and execute the DB entry 4/ Note that the currency is inserted and marked as archived. 5/ Edit the previous order and confirm that the correct currency is still selected. It won't never be displayed anywhere else. 6/ Test the admin script: on admin/currency.pl add/remove/edit currencies. You could not have 2 active currencies at the same time. 7/ Then on the different scripts of the acquisition module, focus on the currencies values and create a new order, receive it. Create/edit a suggestion Other changes must be checked by the QAer. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=15084 --- Comment #29 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 47214 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47214&action=edit Bug 15084: Make sure the previous active currency is marked as inactive On inserting an active currency, others should be marked as inactive. We can only have 1 active currency at the same time. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=15084 --- Comment #30 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 47215 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47215&action=edit Bug 15084: use Koha::Acquisition::Currenc[y|ies] in admin/currency Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=15084 --- Comment #31 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 47216 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47216&action=edit Bug 15084: Replace C4::Budgets::GetCurrencies with Koha::Acquisition::Currencies->search Most part of the code here is unnecessary complex. We should selected the currency if it is selected, that's all :) Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=15084 --- Comment #32 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 47217 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47217&action=edit Bug 15084: Remove C4::Budgets::ConvertCurrency This subroutine is unused and can be removed. There is no trace left of currency in C4::Budgets. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=15084 --- Comment #33 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 47218 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47218&action=edit Bug 15084: Add tests for Koha::Acquisition::Currenc[y|ies] Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=15084 --- Comment #34 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 47219 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47219&action=edit Bug 15084: DB Changes - add currency.archived and FK on aqorders.currency See the comment for details. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=15084 --- Comment #35 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 47220 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47220&action=edit Bug 15084: DBIx::Class - Shema changes Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=15084 --- Comment #36 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 47221 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47221&action=edit Bug 15084 [QA Followup] - Clean up test currencies after unit tests Test currency left behind will cuase next run of the unit test to fail as well as leaving db cruft. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org