If no active currency is defined, Acquisitions dose not work properly and there can occur software errors while receiving. This patch adds the warning about missing active currency to Home > Acquisitions
Created attachment 43744 [details] [review] Bug 15049 - Add warning about "No active currency" to Acquisitions start page If no active currency is defined, Acquisitions dose not work properly and there can occur software errors while receiving. This patch adds the warning about missing active currency to Home > Acquisitions To test: - Apply patch - Go to Home > Administration > Currencies & Exchange Rates > Currencies - Make sure that no active currency is set - Go to Home > Acquisitions - Verify that a warning displays - Set an active currency - Veryfy that warning no longer displays
Created attachment 44017 [details] [review] Bug 15049 - Add warning about "No active currency" to Acquisitions start page If no active currency is defined, Acquisitions dose not work properly and there can occur software errors while receiving. This patch adds the warning about missing active currency to Home > Acquisitions To test: - Apply patch - Go to Home > Administration > Currencies & Exchange Rates > Currencies - Make sure that no active currency is set - Go to Home > Acquisitions - Verify that a warning displays - Set an active currency - Veryfy that warning no longer displays
You need to use currency => GetCurrency()->{currency}, in acqui/acqui-home.pl, if not you get "Currency = HASH(0x763c5a8)" Save for that, it works Ok & without errors.
(In reply to Bernardo Gonzalez Kriegel from comment #3) > You need to use > > currency => GetCurrency()->{currency}, > > in acqui/acqui-home.pl, if not you get "Currency = HASH(0x763c5a8)" > > Save for that, it works Ok & without errors. Hi Bernardo, Thanks for pointing that out. However with GetCurrency()->{currency} I get: Can't use an undefined value as a HASH reference at /usr/share/kohaclone/acqui/acqui-home.pl line 117. The reason is that GetCurrency does a SELECT * FROM currency where active = '1' (C4/Budgets.pm, after line 932) If no active currency is set the return value is not defined.
(In reply to Marc Véron from comment #4) > > However with GetCurrency()->{currency} I get: > > Can't use an undefined value as a HASH reference at > /usr/share/kohaclone/acqui/acqui-home.pl line 117. > > The reason is that GetCurrency does a SELECT * FROM currency where active = > '1' > (C4/Budgets.pm, after line 932) > > If no active currency is set the return value is not defined. Yeap, but 'budgets-active-currency.inc' expects the currency and not a hashref. Other files that use the include put "currency => $cur->{currency}" Perhaps this code my $cur = GetCurrency(); if ( $cur ) { $template->param( currency => $cur->{currency}, ); }
Additionaly there was an issue if an user had no permission to manage the currencies table. In such case the warning message should not display a link to the currencies. Patch follows.
Created attachment 44070 [details] [review] Bug 15049 - Add warning about "No active currency" to Acquisitions start page If no active currency is defined, Acquisitions does not work properly and software can occur while receiving. This patch adds the warning message about missing active currency to Home > Acquisitions To test: - Apply patch - Go to Home > Administration > Currencies & Exchange Rates > Currencies - Make sure that no active currency is set - Go to Home > Acquisitions - Verify that a warning displays: - If user has at least permission for parameters_remaining_perissions, the warning should display a link to Currencies and exchange rates (currency.pl) - If the user has no permission to edit the Currencies and exchange rates, no link is displayed. - Set an active currency - Veryfy that the warning no longer displays
Created attachment 44071 [details] [review] Bug 15049 - Add warning about "No active currency" to Acquisitions start page If no active currency is defined, Acquisitions does not work properly and software can occur while receiving. This patch adds the warning message about missing active currency to Home > Acquisitions To test: - Apply patch - Go to Home > Administration > Currencies & Exchange Rates > Currencies - Make sure that no active currency is set - Go to Home > Acquisitions - Verify that a warning displays: - If user has at least permission for parameters_remaining_perissions, the warning should display a link to Currencies and exchange rates (currency.pl) - If the user has no permission to edit the Currencies and exchange rates, no link is displayed. - Set an active currency - Veryfy that the warning no longer displays (Amended to remove superfluous line / mv)
Created attachment 44076 [details] [review] [SIGNED-OFF] Bug 15049: Add warning about "No active currency" to Acquisitions start page If no active currency is defined, Acquisitions does not work properly and software can occur while receiving. This patch adds the warning message about missing active currency to Home > Acquisitions To test: - Apply patch - Go to Home > Administration > Currencies & Exchange Rates > Currencies - Make sure that no active currency is set - Go to Home > Acquisitions - Verify that a warning displays: - If user has at least permission for parameters_remaining_perissions, the warning should display a link to Currencies and exchange rates (currency.pl) - If the user has no permission to edit the Currencies and exchange rates, no link is displayed. - Set an active currency - Veryfy that the warning no longer displays (Amended to remove superfluous line / mv) Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Work as described. No errors
Now there is a "Currency = EUR" on top of the acqui home page. I am not sure it is useful to display it there.
Created attachment 44148 [details] [review] Bug 15049: Hide currency but preserv alert This follow up hides currency, but the alert pops if no currency is active. To test: 1) Apply the patch 2) Unset any active currency 3) Alert must show on Acquisitons home 4) Set a currency active, no currency display on Acqui home 5) Check that currency IS displayed on /cgi-bin/koha/admin/aqbudgets.pl or /cgi-bin/koha/admin/aqbudgetperiods.pl
I propose a followup to hide the currency
Created attachment 44152 [details] [review] Bug 15049: Hide currency but preserv alert This follow up hides currency, but the alert pops if no currency is active. To test: 1) Apply the patch 2) Unset any active currency 3) Alert must show on Acquisitons home 4) Set a currency active, no currency display on Acqui home 5) Check that currency IS displayed on /cgi-bin/koha/admin/aqbudgets.pl or /cgi-bin/koha/admin/aqbudgetperiods.pl Amended for better translation
Sorry, but my test was bad, only tried with superlibrarian. Marc, are you sure that needed permission check is CAN_user_parameters_parameters_remaining_permissions Can't found another instance of that.
(In reply to Bernardo Gonzalez Kriegel from comment #14) > Sorry, but my test was bad, only tried with superlibrarian. > > Marc, are you sure that needed permission check is > > CAN_user_parameters_parameters_remaining_permissions > > Can't found another instance of that. Bernardo, I wanted the link not to display if the user is not able to edit the currencies table. Who should be able to display and edit the currencies table: When I go through the permissions, I think the following should be able to display and edit the table: - superlibrarian (yes) - paramters (yes) - manage_circ_rules (no, but see remark below) - parameters_remaining_permissions (yes) Strange enough, with manage_circ_rules I can not only edit the circulation rules (what I would expect), but it seems that it allows to edit ALL of the parameters. I think this is a bug, what is yout opinion about? My implementation tests for parameters_remaining_permissions (i.e. CAN_user_parameters_parameters_remaining_permissions internally as I figured out). This triggers the 'mother'-permission for parameters as well. I tested with two browsers, one as superlibrarian for setting the permission and one on an other computer with the non-superlibrarian. It worked well for me. But anyway, it is not really a very important enhancement. I'd rather like to see the C4:Dates sign-offs for Bug 14870 'Delete C4/Dates.pm from System' and Bug 12072 'New dateformat dd.mm.yyyy' move forward.
Created attachment 45274 [details] [review] Bug 15049: (Signed off) Hide currency but preserv alert This follow up hides currency, but the alert pops if no currency is active. To test: 1) Apply the patch 2) Unset any active currency 3) Alert must show on Acquisitons home 4) Set a currency active, no currency display on Acqui home 5) Check that currency IS displayed on /cgi-bin/koha/admin/aqbudgets.pl or /cgi-bin/koha/admin/aqbudgetperiods.pl Amended for better translation Currency does / does not display as described in test plan. Signed-off-by: Marc Véron <veron@veron.ch>
Note regarding comment #15 (...) Strange enough, with manage_circ_rules I can not only edit the circulation rules (what I would expect), but it seems that it allows to edit ALL of the parameters. I think this is a bug, what is yout opinion about? (...) This is not related to this bug. If it is an issue it should have it's own bug.
If there is no ogjection I propose to switch the status to signed-off.
Tested, still applies. @Bernardo (comment #15): Yes, it is CAN_user_parameters_parameters_remaining_permissions
Tested on sandbox 1 biblibre with superlibrarian permissions. Please tell in test plan if I should try with other permissions and which ones.Thx
Patch tested with a sandbox, by JM Broust <jean-manuel.broust@univ-lyon2.fr>
Created attachment 45778 [details] [review] Bug 15049: Add warning about "No active currency" to Acquisitions start page If no active currency is defined, Acquisitions does not work properly and software can occur while receiving. This patch adds the warning message about missing active currency to Home > Acquisitions To test: - Apply patch - Go to Home > Administration > Currencies & Exchange Rates > Currencies - Make sure that no active currency is set - Go to Home > Acquisitions - Verify that a warning displays: - If user has at least permission for parameters_remaining_perissions, the warning should display a link to Currencies and exchange rates (currency.pl) - If the user has no permission to edit the Currencies and exchange rates, no link is displayed. - Set an active currency - Veryfy that the warning no longer displays (Amended to remove superfluous line / mv) Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Work as described. No errors Signed-off-by: JM Broust <jean-manuel.broust@univ-lyon2.fr>
Created attachment 45779 [details] [review] Bug 15049: (Signed off) Hide currency but preserv alert This follow up hides currency, but the alert pops if no currency is active. To test: 1) Apply the patch 2) Unset any active currency 3) Alert must show on Acquisitons home 4) Set a currency active, no currency display on Acqui home 5) Check that currency IS displayed on /cgi-bin/koha/admin/aqbudgets.pl or /cgi-bin/koha/admin/aqbudgetperiods.pl Amended for better translation Currency does / does not display as described in test plan. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: JM Broust <jean-manuel.broust@univ-lyon2.fr>
1/ Should not we update admin/aqplan.tt at the same time? 2/ Should not we put the "please" into the link, to ease the translations?
Created attachment 45840 [details] [review] Bug 15049: (followup) Add warning about "No active currency" Fix translatibiity issues and use include in admin/aqplan.tt as well. See comment #24
Created attachment 45995 [details] [review] Bug 15049: Add warning about "No active currency" to Acquisitions start page If no active currency is defined, Acquisitions does not work properly and software can occur while receiving. This patch adds the warning message about missing active currency to Home > Acquisitions To test: - Apply patch - Go to Home > Administration > Currencies & Exchange Rates > Currencies - Make sure that no active currency is set - Go to Home > Acquisitions - Verify that a warning displays: - If user has at least permission for parameters_remaining_perissions, the warning should display a link to Currencies and exchange rates (currency.pl) - If the user has no permission to edit the Currencies and exchange rates, no link is displayed. - Set an active currency - Veryfy that the warning no longer displays (Amended to remove superfluous line / mv) Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Work as described. No errors Signed-off-by: JM Broust <jean-manuel.broust@univ-lyon2.fr> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 45996 [details] [review] Bug 15049: (Signed off) Hide currency but preserv alert This follow up hides currency, but the alert pops if no currency is active. To test: 1) Apply the patch 2) Unset any active currency 3) Alert must show on Acquisitons home 4) Set a currency active, no currency display on Acqui home 5) Check that currency IS displayed on /cgi-bin/koha/admin/aqbudgets.pl or /cgi-bin/koha/admin/aqbudgetperiods.pl Amended for better translation Currency does / does not display as described in test plan. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: JM Broust <jean-manuel.broust@univ-lyon2.fr> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 45997 [details] [review] Bug 15049: (followup) Add warning about "No active currency" Fix translatibiity issues and use include in admin/aqplan.tt as well. See comment #24 Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 45998 [details] [review] Bug 15049: Simplify code in aqplan.tt There was no need to duplicate this code in the template. The only change with before this patch is that the "Currency = CUR" and "Each cell contain both actual and estimated values." are now displayed on 2 lines instead of 1. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
pushed to master - thanks