As the title says, add support for gitlab to the work started in bug 23975
Created attachment 112066 [details] [review] Bug 24633: Add support for gitlab searching of plugins This patch adds the option to add Gitlab repositories to look for Koha plugins. As with Github, plugin projects need to be named koha-plugin-* and the release file needs to be named with the .kpz extension. To test: 1. Apply this patchset 2. Check either koha-conf.xml or koha-conf.site.xml.in for sample configurations of gitlab targets. 3. Tweak your koha-conf.xml accordingly. You could have: <plugin_repos> <repo> <name>ByWater Solutions</name> <org_name>bywatersolutions</org_name> <service>github</service> </repo- <repo> <name>Theke Solutions</name> <org_name>thekesolutions</org_name> <service>gitlab</service> </repo> <repo> <name>PTFS Europe</name> <org_name>ptfs-europe</org_name> <service>github</service> </repo> </plugin_repos> 4. Flush memcached and restart plack: $ flush_memcached $ koha-plack --restart kohadev 5. Open the plugins page, search for anything, like 'gobi' or 'a' => SUCCESS: You get Theke results! 6. Pick a gitlab plugin for install => SUCCESS: It is installed! 7. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 112067 [details] [review] Bug 24633: (follow-up) Tweak sample plugin targets Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 112068 [details] [review] Bug 24633: Add support for gitlab searching of plugins This patch adds the option to add Gitlab repositories to look for Koha plugins. As with Github, plugin projects need to be named koha-plugin-* and the release file needs to be named with the .kpz extension. To test: 1. Apply this patchset 2. Check either koha-conf.xml or koha-conf.site.xml.in for sample configurations of gitlab targets. 3. Tweak your koha-conf.xml accordingly. You could have: <plugin_repos> <repo> <name>ByWater Solutions</name> <org_name>bywatersolutions</org_name> <service>github</service> </repo- <repo> <name>Theke Solutions</name> <org_name>thekesolutions</org_name> <service>gitlab</service> </repo> <repo> <name>PTFS Europe</name> <org_name>ptfs-europe</org_name> <service>github</service> </repo> </plugin_repos> 4. Flush memcached and restart plack: $ flush_memcached $ koha-plack --restart kohadev 5. Open the plugins page, search for anything, like 'gobi' or 'a' => SUCCESS: You get Theke results! 6. Pick a gitlab plugin for install => SUCCESS: It is installed! 7. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Sponsored-by: Theke Solutions
Created attachment 112069 [details] [review] Bug 24633: (follow-up) Tweak sample plugin targets Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Sponsored-by: Theke Solutions
Created attachment 112074 [details] [review] Bug 24633: Add support for gitlab searching of plugins This patch adds the option to add Gitlab repositories to look for Koha plugins. As with Github, plugin projects need to be named koha-plugin-* and the release file needs to be named with the .kpz extension. To test: 1. Apply this patchset 2. Check either koha-conf.xml or koha-conf.site.xml.in for sample configurations of gitlab targets. 3. Tweak your koha-conf.xml accordingly. You could have: <plugin_repos> <repo> <name>ByWater Solutions</name> <org_name>bywatersolutions</org_name> <service>github</service> </repo- <repo> <name>Theke Solutions</name> <org_name>thekesolutions</org_name> <service>gitlab</service> </repo> <repo> <name>PTFS Europe</name> <org_name>ptfs-europe</org_name> <service>github</service> </repo> </plugin_repos> 4. Flush memcached and restart plack: $ flush_memcached $ koha-plack --restart kohadev 5. Open the plugins page, search for anything, like 'gobi' or 'a' => SUCCESS: You get Theke results! 6. Pick a gitlab plugin for install => SUCCESS: It is installed! 7. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Sponsored-by: Theke Solutions Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 112075 [details] [review] Bug 24633: (follow-up) Tweak sample plugin targets Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Sponsored-by: Theke Solutions Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 112097 [details] [review] Bug 24633: Add support for gitlab searching of plugins This patch adds the option to add Gitlab repositories to look for Koha plugins. As with Github, plugin projects need to be named koha-plugin-* and the release file needs to be named with the .kpz extension. To test: 1. Apply this patchset 2. Check either koha-conf.xml or koha-conf.site.xml.in for sample configurations of gitlab targets. 3. Tweak your koha-conf.xml accordingly. You could have: <plugin_repos> <repo> <name>ByWater Solutions</name> <org_name>bywatersolutions</org_name> <service>github</service> </repo- <repo> <name>Theke Solutions</name> <org_name>thekesolutions</org_name> <service>gitlab</service> </repo> <repo> <name>PTFS Europe</name> <org_name>ptfs-europe</org_name> <service>github</service> </repo> </plugin_repos> 4. Flush memcached and restart plack: $ flush_memcached $ koha-plack --restart kohadev 5. Open the plugins page, search for anything, like 'gobi' or 'a' => SUCCESS: You get Theke results! 6. Pick a gitlab plugin for install => SUCCESS: It is installed! 7. Sign off :-D Sponsored-by: Theke Solutions Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 112098 [details] [review] Bug 24633: (follow-up) Tweak sample plugin targets Sponsored-by: Theke Solutions Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Thanks for taking this on Tomas.. all works well.. Passing QA
Created attachment 113224 [details] [review] Bug 24633: URI escape the search term
It seems that we should URI escape the term before. With this patch if you search "*" you get: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "(end of string)") at /usr/share/perl5/JSON.pm line 190 Without the patch you can search for "*", but "&?&".
Created attachment 113225 [details] [review] Bug 24633: URI escape the search term
(In reply to Jonathan Druart from comment #11) > It seems that we should URI escape the term before. > > With this patch if you search "*" you get: > malformed JSON string, neither tag, array, object, number, string or atom, > at character offset 0 (before "(end of string)") at /usr/share/perl5/JSON.pm > line 190 > > Without the patch you can search for "*", but "&?&". Is it because of this patches?
Certainly not. But the problem exists for both calls I guess. Please fix separately then.
Comment on attachment 113225 [details] [review] Bug 24633: URI escape the search term Won't be pushed here.
(In reply to Jonathan Druart from comment #11) > It seems that we should URI escape the term before. > > With this patch if you search "*" you get: > malformed JSON string, neither tag, array, object, number, string or atom, > at character offset 0 (before "(end of string)") at /usr/share/perl5/JSON.pm > line 190 > > Without the patch you can search for "*", but "&?&". Reported on bug 26952.
Pushed to master for 20.11, thanks to everybody involved!
Since the majority of the work done in Bug 23975 is already in 20.05.x I am choosing to backport the rest of this to 20.05.x backported for 20.05.06
missing dependencies, not backported to 19.11.x
Created attachment 133439 [details] [review] Bug 28633: DB update This adds the field to necessary tables and updates API and columns def Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 133440 [details] [review] Bug 28633: Add preferred name field to patrons This patch adds a new field 'preferred_name' to the patron record. Additionally it adds a method 'effective_name' to choose the preferred name if present and fall back to firstname The 'firstname' is displayed as 'First name' on the details page, with id/class patron_first_name to allow ajusting via JS/CSS if library wants to highlight/hide the non-preferred name PatronAutoComplete/ysearch is updated to use 'effective_name' method To test: 1 - Apply patches 2 - Update database and restart all, clear browser cache 3 - Load a patron in staff module 4 - Confirm you see and can add a preferred name 5 - Confirm the preferred name and first name now displays on patron details 6 - Remove first name from patron record and confirm it no longer shows 7 - Edit sysprefs BorrowerMandatoryFields and BorrowerUnwantedFields to confirm you can make new field required or hidden 8 - Sign in as patron to opac 9 - Confirm preferred name shows 10 - Edit account on opac and confirm field is present 11 - Verify DefaultPatronSearchFields contains 'preferredname' if your pref had firstname 12 - Perform checkout and patron search using preferred_name, confirm patron is found 13 - Enable PatronAutoComplete system preference 14 - Type patron's surname into Checkout or patron search but don't hit enter 15 - Confirm patron is displayed with 'preferred_name' in the preview Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 133441 [details] [review] Bug 28633: (follow-up) Account for bug 29695 changes During rebase of this patchset we drop the columns.def and borrowers.json changes introduced. We store this mapping in the module now, so this patch does that.
Created attachment 133442 [details] [review] Bug 28633: (follow-up) Account for changes with bug 30063 Bug 30063 removes the C4/Utils/DataTables/Members.pm module and instead uses the API and a patron-search include to define the default search fields. This follow-up adds preferred_name into the default fields in that include now the the module has been removed
Created attachment 133443 [details] [review] Bug 28633: DO NOT PUSH Schema Changes Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 133444 [details] [review] Bug 28633: (QA follow-up) Add preferred_name to ysearch This adds preferred_name to the search fields in the autocomplete search system.