Bug 26908 - EDI vendor accounts edit no longer allows plugins to be selected for an account
Summary: EDI vendor accounts edit no longer allows plugins to be selected for an account
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: All All
: P5 - low critical (vote)
Assignee: Kyle M Hall
QA Contact: Martin Renvoize
URL:
Keywords:
Depends on: 20415
Blocks:
  Show dependency treegraph
 
Reported: 2020-11-03 13:31 UTC by Kyle M Hall
Modified: 2020-11-17 20:55 UTC (History)
4 users (show)

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


Attachments
Bug 26908: Restore ability to view and select EDI plugins for a vendor account (908 bytes, patch)
2020-11-03 13:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 26908: Restore ability to view and select EDI plugins for a vendor account (941 bytes, patch)
2020-11-04 00:54 UTC, David Nind
Details | Diff | Splinter Review
Bug 26908: Restore ability to view and select EDI plugins for a vendor account (1006 bytes, patch)
2020-11-05 12:45 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 26908: (follow-up) Alter template check (1.45 KB, patch)
2020-11-05 12:45 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2020-11-03 13:31:23 UTC
I believe the removal of the syspref caused the plugins pulldown to no longer show on the edi vendor accounts editor.
Comment 1 Kyle M Hall 2020-11-03 13:33:49 UTC
Created attachment 112919 [details] [review]
Bug 26908: Restore ability to view and select EDI plugins for a vendor account

Test Plan:
1) Install an EDI plugin
2) Browse to edi_accounts.pl, create or edit an account
3) Note the plugins pulldown is missing
4) Apply this patch
5) Restart all the things!
6) Reload the page
7) Note the pulldown is back!
Comment 2 David Nind 2020-11-04 00:54:53 UTC
Created attachment 112969 [details] [review]
Bug 26908: Restore ability to view and select EDI plugins for a vendor account

Test Plan:
1) Install an EDI plugin
2) Browse to edi_accounts.pl, create or edit an account
3) Note the plugins pulldown is missing
4) Apply this patch
5) Restart all the things!
6) Reload the page
7) Note the pulldown is back!

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2020-11-04 01:04:47 UTC
Testing notes - step 1:

1. Download one of the EDI plugins from https://github.com/bywatersolutions/koha-plugin-edifact-enhanced/releases (it doesn't matter which one).

2. Install the plugin (Koha administration > Plugins > Manage plugins > Upload plugin > browse for the plugin you downloaded in step 1 > click upload - the plugin will then show in the list of plugins).

Note: Plugins need to be enabled for your development environment - make sure your plugin directory is set (KTD = <pluginsdir>/var/lib/koha/kohadev/plugins</pluginsdir>) and it is enabled (<enable_plugins>1</enable_plugins>) in the koha-conf.xml file for your instance.
Comment 4 Martin Renvoize 2020-11-05 12:41:27 UTC
I feel like instead of introducing a further call to set plugins_enabled and passing it to the template we should just check for the presence of the 'plugins' variable directly in the template instead.

Thoughts?
Comment 5 Martin Renvoize 2020-11-05 12:45:06 UTC
Created attachment 113096 [details] [review]
Bug 26908: Restore ability to view and select EDI plugins for a vendor account

Test Plan:
1) Install an EDI plugin
2) Browse to edi_accounts.pl, create or edit an account
3) Note the plugins pulldown is missing
4) Apply this patch
5) Restart all the things!
6) Reload the page
7) Note the pulldown is back!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize 2020-11-05 12:45:10 UTC
Created attachment 113097 [details] [review]
Bug 26908: (follow-up) Alter template check

This alters the template check to use the presence of the plugins
arrayref rather than requiring a second call to check for
plugins_enabled.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize 2020-11-05 12:47:10 UTC
Minor tidy up followup added.. 

Works well, 

Passing QA
Comment 8 Jonathan Druart 2020-11-05 14:25:37 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 9 Lucas Gass 2020-11-16 21:54:01 UTC
backported to 20.05.x for 20.05.06
Comment 10 Aleisha Amohia 2020-11-17 05:33:21 UTC
I'm sure this depends on something but I don't know what. What syspref was removed? Is this needed for 19.11.x?
Comment 11 Katrin Fischer 2020-11-17 07:00:54 UTC
I am not sure if it's needed, but the pref was UsePlugins.
Comment 12 Aleisha Amohia 2020-11-17 20:16:29 UTC
Thanks Katrin, I believe this probably depends on Bug 20415 then, so this patch isn't needed in 19.11.x. Not backported