Bug 11939 - Sample of currencies with a working active value
Summary: Sample of currencies with a working active value
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Zeno Tajoli
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-14 10:49 UTC by Zeno Tajoli
Modified: 2015-12-03 22:03 UTC (History)
6 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Trivial patch
Text to go in the release notes:
Version(s) released in:


Attachments
better default for currencies, eng setup (1.85 KB, patch)
2014-03-14 11:08 UTC, Zeno Tajoli
Details | Diff | Splinter Review
[SIGNED OFF] Bug 11939 - Better default for currencies (2.16 KB, patch)
2014-03-16 15:44 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 11939: Add active currency for all data files (6.86 KB, patch)
2014-03-17 16:22 UTC, Jonathan Druart
Details | Diff | Splinter Review
Generates currency sql files to copy into place. (2.10 KB, application/x-perl)
2014-03-18 21:14 UTC, Mark Tompsett
Details
[SIGNED OFF] Bug 11939: Add active currency for all data files (8.20 KB, patch)
2014-03-19 03:43 UTC, Mark Tompsett
Details | Diff | Splinter Review
[PASSED QA] Bug 11939 - Better default for currencies (2.27 KB, patch)
2014-03-23 19:59 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 11939: Add active currency for all data files (8.27 KB, patch)
2014-03-23 19:59 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Zeno Tajoli 2014-03-14 10:49:53 UTC
In default english setup currencies are in mysql/en/optional/parameters.sql file.
The default is set to USA dollar because its value is '1' but now this setup
is not enough.
Now is better to add also values in 'active' column.

I insert 'active' (value '1') for USA dollar, 'not active' (value '0') for others.

The description in mysql/en/optional/parameters.txt file is no more correct, so I correct it.
Comment 1 Zeno Tajoli 2014-03-14 11:08:57 UTC Comment hidden (obsolete)
Comment 2 Mark Tompsett 2014-03-16 15:44:06 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2014-03-17 16:22:15 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2014-03-17 16:23:05 UTC
Zeno, I completely agree but I think the change should be done for all languages data.
Comment 5 Zeno Tajoli 2014-03-17 16:38:58 UTC
Ok, no problem.
In your opipion canI check you patch ?
Because I find difficult that someone wants to try six installation in 6 different languages.
Comment 6 Jonathan Druart 2014-03-17 16:43:37 UTC
  mysql < /path/to/file.sql
for each one should be enough.
Comment 7 Mark Tompsett 2014-03-17 18:01:00 UTC
GAH! I think you were right to complain about the other currency files, Jonathan. However, did you not see how they differed? It would be nice if they were all standardized.

All the currencies used in all the currency files should be in the currency files on every other language, though the default and active one should not be the same.
Comment 8 Jonathan Druart 2014-03-18 08:31:35 UTC
(In reply to M. Tompsett from comment #7)
> All the currencies used in all the currency files should be in the currency
> files on every other language, though the default and active one should not
> be the same.

Yes, it is what my patch does, if I understand you well. The only difference between 2 currency files would be the "active" value.
Comment 9 Mark Tompsett 2014-03-18 14:10:57 UTC
After discussing with Jonathan on IRC, we agreed to lock the scope of this to just adding the active column into the samples, and that another bug will deal with the clean up of the sample currency files.
Comment 10 Katrin Fischer 2014-03-18 20:51:16 UTC
I am not sure that every file should have the same currencies. Depending on where you are you might order books from other countries - countries with the same language or neighbouring countries etc. I think it should be ok to leave some room for customizing those.
Comment 11 Mark Tompsett 2014-03-18 21:14:43 UTC
Created attachment 26439 [details]
Generates currency sql files to copy into place.

What I was thinking about.
Comment 12 Mark Tompsett 2014-03-19 03:43:03 UTC Comment hidden (obsolete)
Comment 13 Katrin Fischer 2014-03-23 19:59:29 UTC
Created attachment 26523 [details] [review]
[PASSED QA] Bug 11939 - Better default for currencies

This patch offers a better default for currencies,
with USA dollar as default active currency.

To test the patch:
1)Install master without the patch, during web installation
select 'parameters.sql' file
2)Finish install and go to Administration -Currencies & Exchange rates
3)No active currency

4)Install master with this patch, during web installation
 select 'parameters.sql' file
5)Finish install and go to Administration -Currencies & Exchange rates
6)Now USA dollar is the active currency

http://bugs.koha-community.org/show_bug.cgi?id=11939

NOTE: This does solve the problem of everything being NULL for active,
      and lacking an active value. It also corrects the description
      of the optional item to check related to currencies.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes all tests and QA script.
Comment 14 Katrin Fischer 2014-03-23 19:59:49 UTC
Created attachment 26524 [details] [review]
[PASSED QA] Bug 11939: Add active currency for all data files

Revised Test Plan
-----------------
The following SQL commands were used to test this.

installer/data/mysql/en/optional/parameters.sql is part of the
first patch and didn't really need testing again.

installer/data/mysql/de-DE/optional/parameters.sql is not part
of the patch, but since I was playing with the script, which
is also attached here, it was included for good measure.

use kohadata;
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE currency;
source /home/mtompset/kohaclone/installer/data/mysql/pl-PL/optional/parameters.sql
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE currency;
source /home/mtompset/kohaclone/installer/data/mysql/es-ES/optional/parameters.sql
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE currency;
source /home/mtompset/kohaclone/installer/data/mysql/ru-RU/optional/sample_currency.sql
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE currency;
source /home/mtompset/kohaclone/installer/data/mysql/uk-UA/optional/sample_currency.sql
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE currency;
source /home/mtompset/kohaclone/installer/data/mysql/it-IT/necessari/parameters.sql
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE currency;
source /home/mtompset/kohaclone/installer/data/mysql/de-DE/optional/parameters.sql
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE currency;
source /home/mtompset/kohaclone/installer/data/mysql/nb-NO/2-Valgfritt/parameters.sql
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE currency;
source /home/mtompset/kohaclone/installer/data/mysql/en/optional/parameters.sql

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comment 15 Galen Charlton 2014-03-25 15:05:36 UTC
Pushed to master.  Thanks, Jonathan and Zeno!
Comment 16 Fridolin Somers 2014-06-12 09:32:37 UTC
Pushed to 3.14.x, will be in 3.14.08
Comment 17 Kyle M Hall 2014-06-13 13:13:50 UTC
Pushed to 3.12.x, will be in 3.12.13