Bug 19394 - Add ability for IT administrators to skip onboarding tool, and then display the tool to superlibrarians when they first log in
Summary: Add ability for IT administrators to skip onboarding tool, and then display t...
Status: BLOCKED
Alias: None
Product: Koha
Classification: Unclassified
Component: Installation and upgrade (web-based installer) (show other bugs)
Version: 17.05
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Julian Maurice
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-02 04:50 UTC by Alex Buckley
Modified: 2019-03-21 05:17 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:
Circulation function:


Attachments
Bug 19394 - Ability to skip the onboarding tool implemented (2.40 KB, patch)
2017-10-02 04:51 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19384 - Ability to skip the onboarding tool and then redirect the next user to it (8.25 KB, patch)
2017-10-03 03:55 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19394 - Ability to skip the onboarding tool implemented (2.40 KB, patch)
2017-10-14 01:42 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19384 - Ability to skip the onboarding tool and then redirect the next user to it (8.09 KB, patch)
2017-10-14 01:43 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19394 - Ability to skip the onboarding tool implemented (2.40 KB, patch)
2017-10-16 18:30 UTC, David Bourgault
Details | Diff | Splinter Review
Bug 19384 - Ability to skip the onboarding tool and then redirect the next user to it (8.09 KB, patch)
2017-10-16 18:30 UTC, David Bourgault
Details | Diff | Splinter Review
Bug 19394 - Ability to skip the onboarding tool implemented (2.46 KB, patch)
2017-10-16 18:31 UTC, David Bourgault
Details | Diff | Splinter Review
Bug 19384 - Ability to skip the onboarding tool and then redirect the next user to it (8.15 KB, patch)
2017-10-16 18:31 UTC, David Bourgault
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-10-02 04:50:09 UTC
In many institutions it is the IT administrator staff member or support vendor rather than a librarian that will install Koha. These people may not know what the institution would like to set for the library branch, patron category, patron superlibrarian, item type and circulation rule and so it would be good to provide the ability for these users to skip the onboarding tool.

In order to make sure that this data is entered the next user they tries to login with the koha database administrator account is prompted back to the onboarding tool to complete it.
Comment 1 Alex Buckley 2017-10-02 04:51:52 UTC
Created attachment 67498 [details] [review]
Bug 19394 - Ability to skip the onboarding tool implemented
Comment 2 Alex Buckley 2017-10-03 03:55:59 UTC
Created attachment 67542 [details] [review]
Bug 19384 - Ability to skip the onboarding tool and then redirect the next user to it

To allow IT staff and support vendors to quickly install Koha for
clients this patch allows these people to skip the onboarding tool and
go straight from the web installer to authenticating to the intranet.

As well as allowing these users to install Koha quickly, the other
purpose of this patch is that these people are unlikely to know what the
library wants set as the library, patron category, administrator patron
credentials, item type and circulation rule and so it is better to leave
that to a librarian to fill out.

The next user to log in (they will have to use the Koha db administrator
credentials) after Koha has been installed (and only if the onboarding
tool was skipped) is then redirected to
login to the web installer to go through the onboarding tool.

Test plan:
1. Drop and recreate your Koha database

2. Restart memcached

3. Go through the web installer and notice that on the page which says
congradulations that you have successfully installed Koha there is a
link to click to load the onboarding tool otherwise if you wait 10
seconds you are redirected anyway.

4. Apply patch

5. Repeat steps 1 and 2

6. Go through the web installer without installing sample patrons and
notice on the same page described in step 3 there are now 2 links: one
to go to the onboarding tool and one to skip the onboarding process.
Also notice that if you wait 10 seconds you are not redirected to the
onboarding tool.

7. Click the skip link

8. Notice the intranet login page appears, login using the Koha db
adminstrator credentials and notice that the mainpage appears.

9. Now logout and login again and notice that you are redirected to the
Web installer login page, login and notice that the onboarding tool is
displayed

10. Repeat steps 1 and 2 and this time install sample data including sample
patrons

11. On the page described on step 3 click the skip link.

12. Notice that the intranet login page appears, login and then logout

13. Try logging in again and notice that you are redirected to the web
installer login page and after authenticating the onboarding tool is
displayed.

14. Repeat steps 1 and 2 go through the web installer and on the page
described in step 3 click the onboarding link and notice that a page
from the onboarding process is displayed.

15. Aftergoing through the onboarding tool login as db administrator and
then logout and login again and notice that you are not redirected to
the onboarding tool because you have already completed it

Sponsored-By: Catalyst IT
Comment 3 Katrin Fischer 2017-10-08 11:19:38 UTC
Please don't forget to assign your bugs to yourself :)
Comment 4 Alex Buckley 2017-10-09 04:13:14 UTC
Oops thanks Katrin :)
Comment 5 David Bourgault 2017-10-13 18:29:07 UTC
Hi,

Patch does not apply on most recent master. It says the conflict is in koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt

David
Comment 6 Alex Buckley 2017-10-14 01:42:54 UTC
Created attachment 68116 [details] [review]
Bug 19394 - Ability to skip the onboarding tool implemented
Comment 7 Alex Buckley 2017-10-14 01:43:20 UTC
Created attachment 68117 [details] [review]
Bug 19384 - Ability to skip the onboarding tool and then redirect the next user to it

To allow IT staff and support vendors to quickly install Koha for
clients this patch allows these people to skip the onboarding tool and
go straight from the web installer to authenticating to the intranet.

As well as allowing these users to install Koha quickly, the other
purpose of this patch is that these people are unlikely to know what the
library wants set as the library, patron category, administrator patron
credentials, item type and circulation rule and so it is better to leave
that to a librarian to fill out.

The next user to log in (they will have to use the Koha db administrator
credentials) after Koha has been installed (and only if the onboarding
tool was skipped) is then redirected to
login to the web installer to go through the onboarding tool.

Test plan:
1. Drop and recreate your Koha database

2. Restart memcached

3. Go through the web installer and notice that on the page which says
congradulations that you have successfully installed Koha there is a
link to click to load the onboarding tool otherwise if you wait 10
seconds you are redirected anyway.

4. Apply patch

5. Repeat steps 1 and 2

6. Go through the web installer without installing sample patrons and
notice on the same page described in step 3 there are now 2 links: one
to go to the onboarding tool and one to skip the onboarding process.
Also notice that if you wait 10 seconds you are not redirected to the
onboarding tool.

7. Click the skip link

8. Notice the intranet login page appears, login using the Koha db
adminstrator credentials and notice that the mainpage appears.

9. Now logout and login again and notice that you are redirected to the
Web installer login page, login and notice that the onboarding tool is
displayed

10. Repeat steps 1 and 2 and this time install sample data including sample
patrons

11. On the page described on step 3 click the skip link.

12. Notice that the intranet login page appears, login and then logout

13. Try logging in again and notice that you are redirected to the web
installer login page and after authenticating the onboarding tool is
displayed.

14. Repeat steps 1 and 2 go through the web installer and on the page
described in step 3 click the onboarding link and notice that a page
from the onboarding process is displayed.

15. Aftergoing through the onboarding tool login as db administrator and
then logout and login again and notice that you are not redirected to
the onboarding tool because you have already completed it

Sponsored-By: Catalyst IT
Comment 8 Alex Buckley 2017-10-14 01:44:48 UTC
Hi David

I have attached rebased patches, which now apply successfully on an up to date branch. Can you please test again

Cheers
Alex
Comment 9 David Bourgault 2017-10-16 18:30:13 UTC Comment hidden (obsolete)
Comment 10 David Bourgault 2017-10-16 18:30:16 UTC Comment hidden (obsolete)
Comment 11 David Bourgault 2017-10-16 18:31:16 UTC
Created attachment 68190 [details] [review]
Bug 19394 - Ability to skip the onboarding tool implemented

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Comment 12 David Bourgault 2017-10-16 18:31:19 UTC
Created attachment 68191 [details] [review]
Bug 19384 - Ability to skip the onboarding tool and then redirect the next user to it

To allow IT staff and support vendors to quickly install Koha for
clients this patch allows these people to skip the onboarding tool and
go straight from the web installer to authenticating to the intranet.

As well as allowing these users to install Koha quickly, the other
purpose of this patch is that these people are unlikely to know what the
library wants set as the library, patron category, administrator patron
credentials, item type and circulation rule and so it is better to leave
that to a librarian to fill out.

The next user to log in (they will have to use the Koha db administrator
credentials) after Koha has been installed (and only if the onboarding
tool was skipped) is then redirected to
login to the web installer to go through the onboarding tool.

Test plan:
1. Drop and recreate your Koha database

2. Restart memcached

3. Go through the web installer and notice that on the page which says
congradulations that you have successfully installed Koha there is a
link to click to load the onboarding tool otherwise if you wait 10
seconds you are redirected anyway.

4. Apply patch

5. Repeat steps 1 and 2

6. Go through the web installer without installing sample patrons and
notice on the same page described in step 3 there are now 2 links: one
to go to the onboarding tool and one to skip the onboarding process.
Also notice that if you wait 10 seconds you are not redirected to the
onboarding tool.

7. Click the skip link

8. Notice the intranet login page appears, login using the Koha db
adminstrator credentials and notice that the mainpage appears.

9. Now logout and login again and notice that you are redirected to the
Web installer login page, login and notice that the onboarding tool is
displayed

10. Repeat steps 1 and 2 and this time install sample data including sample
patrons

11. On the page described on step 3 click the skip link.

12. Notice that the intranet login page appears, login and then logout

13. Try logging in again and notice that you are redirected to the web
installer login page and after authenticating the onboarding tool is
displayed.

14. Repeat steps 1 and 2 go through the web installer and on the page
described in step 3 click the onboarding link and notice that a page
from the onboarding process is displayed.

15. Aftergoing through the onboarding tool login as db administrator and
then logout and login again and notice that you are not redirected to
the onboarding tool because you have already completed it

Sponsored-By: Catalyst IT

https://bugs.koha-community.org/show_bug.cgi?id=19394

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Comment 13 David Bourgault 2017-10-16 18:35:51 UTC
oops, I forgot to add the signoff line.

Patch works as expected. QA tool did say something about a missing blank line before =cut in Koha/Patrons.pm, but I didn't want to fail QA patch for this so I took the liberty of adding the missing line. Hope that's OK.
Comment 14 Alex Buckley 2017-10-16 19:55:40 UTC
Thanks David
Comment 15 Julian Maurice 2018-01-12 15:24:43 UTC
Hi Alex,

Here are a few things you need to change:
1. Remove all occurences of onboardingrequired, it's stored in a bad place, it's badly used and you don't need it (explanation below:)
  a. userflags contain name and description of user permissions, it's not a place to store arbitrary flags (despite its name)
  b. if we decide to skip the onboarding tool, the first time the DB user logs in they are not redirected to the onboarding tool because onboardingrequired's value is 0 (it's set to 1 only at this moment), so the user need to reload the page to be redirected to the onboarding tool. Moreover onboardingrequired is still equals to 1 after the onboarding process
  c. you don't need it because you have another check that is (IMO) enough : if there is at least one user that have permission superlibrarian, it means that someone is gone through the onboarding process (or someone has manually configured Koha, which means the onboarding process is not needed)

2. check_if_patrons_have_flags is not needed: you can replace it by Koha::Patrons->search({flags => { '!=' => undef }}) (and anyway the previous check is enough IMO, so it could be completely removed)

3. I think that changes in installer/onboarding.pl are not needed:
  a. you changed the redirection to installer/install.pl to mainpage.pl, which then redirects to installer/install.pl, so it adds one more redirection for the same result
  b. there seems to be no scenario where $op == 'skip', can you confirm that ?

Now that's a personal opinion but I believe that a warning message would be better than an automatic redirect. There might be some cases where I don't want to go through the onboarding process at all and this redirect could become annoying
Comment 16 Alex Buckley 2018-10-31 03:01:34 UTC
Hi there

I am going to put this bug report status on 'Blocked' until I have a bit more time to revisit this particular bug. 

Cheers,
Alex