Bug 18888 - Include the definition of currency in onboarding tool
Summary: Include the definition of currency in onboarding tool
Status: Patch doesn't apply
Alias: None
Product: Koha
Classification: Unclassified
Component: Installation and upgrade (web-based installer) (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Hayley Pelham
QA Contact: Testopia
URL:
Keywords:
Depends on: 18308
Blocks: 21265 22681
  Show dependency treegraph
 
Reported: 2017-06-30 21:06 UTC by Alex Buckley
Modified: 2022-01-20 00:59 UTC (History)
8 users (show)

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


Attachments
Bug 18888 - Currency defined in new onboardingstep6.tt after installation (8.77 KB, patch)
2017-07-03 00:20 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 18888 - Currency defined in new onboardingstep6.tt after installation (8.94 KB, patch)
2017-07-03 07:57 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 18888: (follow-up) Updated Currency onboarding step to match DB (7.82 KB, patch)
2019-03-18 01:17 UTC, Hayley Pelham
Details | Diff | Splinter Review
Bug 18888: (follow-up) Fixed script tag for QA tools (1.25 KB, patch)
2019-03-18 01:18 UTC, Hayley Pelham
Details | Diff | Splinter Review
Bug 18888: Updated Currency onboarding step to match DB (16.20 KB, patch)
2019-04-09 05:59 UTC, Hayley Pelham
Details | Diff | Splinter Review
Bug 18888: Added missing template file (8.98 KB, patch)
2019-04-09 21:24 UTC, Hayley Pelham
Details | Diff | Splinter Review
Bug 18888: Updated Currency onboarding step to match DB (16.24 KB, patch)
2019-04-10 01:33 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 18888: Added missing template file (9.02 KB, patch)
2019-04-10 01:33 UTC, Liz Rea
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Buckley 2017-06-30 21:06:57 UTC
At present when installing Koha currencies are only defined if the user decides to install them whilst going through the web installer.

Currencies are important because they are used in the acquisition and fines module and so they should be set up in the onboarding tool with the creation of the library, patron category, patron administrator, item type and circulation rule
Comment 1 Alex Buckley 2017-07-03 00:20:46 UTC
Created attachment 64767 [details] [review]
Bug 18888 - Currency defined in new onboardingstep6.tt after installation

Test plan:
1. Restart memcached and drop and recreate your database

2. Go through the Koha web installer making sure to install all data
except the currencies

3. Run through the onboarding tool noticing that after creating the
circulation rule the complete page appears and you can click to log into
Koha with the superlibrarian user you have created in the onboarding
tool

4. Apply patch

5. Repeat step 1, and 2

6. Run through the onboarding tool and notice that after creating the
circulation rule, a screen appears for you to define a currency

7. Write in the currency name and symbol (notice: you cannot edit the
exchange rate of 1) and submit the form

8. Notice the complete screen appears and you can log in with the
superlibrarian account created in the onboarding tool

9. Go to Administration->Currencies and exchange rates and notice that
the currency you created in the onboarding tool is displayed as active

10. Repeat step 1

11. Go through the Koha web installer making sure to install all data
including currencies

12. Run through the onboarding tool and notice that after creating the
circulation rule then the complete screen appears and click to log into
Koha with your superlibrarian account

13. Run qa tool and all tests should be successful

14. Sign off
Sponsored-by: Catalyst IT
Comment 2 Marc Véron 2017-07-03 07:57:54 UTC
Created attachment 64771 [details] [review]
Bug 18888 - Currency defined in new onboardingstep6.tt after installation

Test plan:
1. Restart memcached and drop and recreate your database

2. Go through the Koha web installer making sure to install all data
except the currencies

3. Run through the onboarding tool noticing that after creating the
circulation rule the complete page appears and you can click to log into
Koha with the superlibrarian user you have created in the onboarding
tool

4. Apply patch

5. Repeat step 1, and 2

6. Run through the onboarding tool and notice that after creating the
circulation rule, a screen appears for you to define a currency

7. Write in the currency name and symbol (notice: you cannot edit the
exchange rate of 1) and submit the form

8. Notice the complete screen appears and you can log in with the
superlibrarian account created in the onboarding tool

9. Go to Administration->Currencies and exchange rates and notice that
the currency you created in the onboarding tool is displayed as active

10. Repeat step 1

11. Go through the Koha web installer making sure to install all data
including currencies

12. Run through the onboarding tool and notice that after creating the
circulation rule then the complete screen appears and click to log into
Koha with your superlibrarian account

13. Run qa tool and all tests should be successful

14. Sign off
Sponsored-by: Catalyst IT

Folloewe test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Comment 3 Jonathan Druart 2018-02-13 23:48:38 UTC
Maybe this patch should take into account the new fields that will be added by bug 4078.
Comment 4 Katrin Fischer 2018-03-12 14:26:01 UTC
As 4078 is now PQA, I agree with Jonathan. Alex, can you please take a look? Sorry!
Comment 5 Katrin Fischer 2018-03-12 14:27:05 UTC
Please also check:
 FAIL	koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep6.tt
   FAIL	  forbidden patterns
		forbidden pattern: Include [% KOHA_VERSION %] in js paths (bug 12904) - May be false positive (line 12)
Comment 6 Hayley Pelham 2019-03-14 03:26:13 UTC
(In reply to Jonathan Druart from comment #3)
> Maybe this patch should take into account the new fields that will be added
> by bug 4078.

Hello, please can you outline exactly what is needed to move this patch forward? a column needs to be added to the currency table?
Comment 7 Katrin Fischer 2019-03-14 06:46:59 UTC
Hi Hayley, new options were added to the currency definition in Koha since this patch has been written, so it needs to catch up to those changes. Namely: 
Space separation between symbol and value.
Comment 8 Hayley Pelham 2019-03-18 01:17:23 UTC
Created attachment 86709 [details] [review]
Bug 18888: (follow-up) Updated Currency onboarding step to match DB

Between the time that this patch was originally created and now, a field
has been added to the currency table which allows the user to specify
whether the currency should appear with a space between the symbol and
value. This patch updates the onboarding tool to accommodate that
option, as well as cleans up some issues with script tags and duplicate
entries to the DB.

Test plan:

1) Drop and recreate your database, then restart_all

2) Go through the web installer and install all data except the
currencies

3) Go through the onboarding tool and note that when you get to the
currency page that there is no option for setting there to be a space
between symbol and value

4) Apply the patch, and repeat step 1 and 2

5) Go through the onboarding tool again and this time note that on the
currency page there is an option to set there to be a space between
symbol and value - check this box.

6) Continue on to Koha

7) Apply a fine to a patron, log in as that patron, and verify that the
currency is displayed with a space between the symbol and the value in
the OPAC

8) Also verify that there is only one currency (the one you created) in
the currency table in your database

Note: This patch may fail the QA tools due to Asset not working with the
installer.

Sponsored-by: Catalyst IT
Comment 9 Hayley Pelham 2019-03-18 01:18:20 UTC
Created attachment 86710 [details] [review]
Bug 18888: (follow-up) Fixed script tag for QA tools

Removed type reference in the script tag in onboardingstep6.tt -
Note: the QA tools will still fail this tag for using a full path rather
than Asset.

Sponsored-by: Catalyst IT
Comment 10 Hayley Pelham 2019-03-28 01:19:25 UTC
This bug should depend on Bug 18308 as it is part of the onboarding tool. I will fix it to reflect this.
Comment 11 Hayley Pelham 2019-04-09 05:59:12 UTC
Created attachment 87574 [details] [review]
Bug 18888: Updated Currency onboarding step to match DB

Between the time that the original patch was created and now, a field
has been added to the currency table which allows the user to specify
whether the currency should appear with a space between the symbol and
value. This patch updates the onboarding tool to accommodate that
option, as well as cleans up some issues with script tags and duplicate
entries to the DB. This patch depends on Bug 18308, building on the
steps that have been rearranged.

Test plan:

0) Apply patch 18308.

1) Drop and recreate your database, then restart_all

2) Go through the onboarding tool, noting that the order matches the
following:
 1 Create a library
 2 Create patron category
 3 Set minPasswordLength
 4 Create Koha administrator
 5 Create item type
 6 Define currency (see step 3!)
 7 Circulation rule/Complete

3) Note that when you get to the currency page that there is no option
for setting there to be a space between symbol and value

4) Apply this patch, and repeat step 1 - 3

5) Go through the onboarding tool again and this time note that on the
currency page there is an option to set there to be a space between
symbol and value - check this box.

6) Continue on to Koha

7) Apply a fine to a patron, log in as that patron, and verify that the
currency is displayed with a space between the symbol and the value in
the OPAC

8) Also verify that there is only one currency (the one you created) in
the currency table in your database

Note: This patch may fail the QA tools due to Asset not working with the
installer.

Sponsored-by: Catalyst IT
Comment 12 Liz Rea 2019-04-09 21:07:59 UTC
Hi, 

At step 7, I've got 

Template process failed: file error - /home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep7.tt : not found at /home/vagrant/kohaclone/C4/Templates.pm line 122

After clicking "submit" on the define a currency page.

Something I had not noticed before in the onboarder, is that the "next" buttons all say Submit on them. I think I'd rather they say something like "save and continue" or "Next" instead, as Submit is a developer word for what the button is/does. That doesn't need to be fixed here, but I may file another bug for it.

Thanks for having another look,

Liz
Comment 13 Liz Rea 2019-04-09 21:14:24 UTC
I think probably you just forgot to add the file for step 7 with git add <path> :D
Comment 14 Hayley Pelham 2019-04-09 21:24:44 UTC
Created attachment 87687 [details] [review]
Bug 18888: Added missing template file

Thanks for testing Liz. Here is the missing file!

Sponsored-by: Catalyst IT.
Comment 15 Liz Rea 2019-04-10 01:33:11 UTC
Created attachment 87691 [details] [review]
Bug 18888: Updated Currency onboarding step to match DB

Between the time that the original patch was created and now, a field
has been added to the currency table which allows the user to specify
whether the currency should appear with a space between the symbol and
value. This patch updates the onboarding tool to accommodate that
option, as well as cleans up some issues with script tags and duplicate
entries to the DB. This patch depends on Bug 18308, building on the
steps that have been rearranged.

Test plan:

0) Apply patch 18308.

1) Drop and recreate your database, then restart_all

2) Go through the onboarding tool, noting that the order matches the
following:
 1 Create a library
 2 Create patron category
 3 Set minPasswordLength
 4 Create Koha administrator
 5 Create item type
 6 Define currency (see step 3!)
 7 Circulation rule/Complete

3) Note that when you get to the currency page that there is no option
for setting there to be a space between symbol and value

4) Apply this patch, and repeat step 1 - 3

5) Go through the onboarding tool again and this time note that on the
currency page there is an option to set there to be a space between
symbol and value - check this box.

6) Continue on to Koha

7) Apply a fine to a patron, log in as that patron, and verify that the
currency is displayed with a space between the symbol and the value in
the OPAC

8) Also verify that there is only one currency (the one you created) in
the currency table in your database

Note: This patch may fail the QA tools due to Asset not working with the
installer.

Sponsored-by: Catalyst IT

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
I confirm that the QA tool has a false positive for Asset.
Comment 16 Liz Rea 2019-04-10 01:33:14 UTC
Created attachment 87692 [details] [review]
Bug 18888: Added missing template file

Thanks for testing Liz. Here is the missing file!

Sponsored-by: Catalyst IT.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Comment 17 Katrin Fischer 2019-04-12 08:32:50 UTC
Temporarily blocked by dependency - moving back into the QA queue once that is resolved.
Comment 18 Victor Grousset/tuxayo 2022-01-20 00:59:38 UTC
Dependency not blocking anymore but rebase needed