Bug 25285

Summary: Wrong message when plugin required Koha version isn't met
Product: Koha Reporter: Victor Grousset/tuxayo <victor>
Component: Plugin architectureAssignee: Tomás Cohen Arazi <tomascohen>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: aleisha, dcook, fridolin.somers, kyle, martin.renvoize, tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24631
Change sponsored?: --- Patch complexity: String patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00,21.11.05
Bug Depends on: 21866    
Bug Blocks:    
Attachments: Bug 25285: Fix wrong message about required Koha version in plugins
Bug 25285: Fix wrong message about required Koha version in plugins
Bug 25285: Fix wrong message about required Koha version in plugins

Description Victor Grousset/tuxayo 2020-04-26 03:53:52 UTC
(not sure about the bug category)

== Test plan ==
- Install the Kitchen Sink plugin: https://github.com/bywatersolutions/koha-plugin-kitchen-sink/releases
  - (the .kpz)
- go to the plugin directory.
  - example: /var/lib/koha/kohadev/plugins/Koha/Plugin/Com/ByWaterSolutions
  - edit minimum_version to be above you koha version
- go plugin home page
- you should see «Warning: This report was written for a newer version of Koha. Run at your own risk.»
- this wrong!
Comment 1 Victor Grousset/tuxayo 2020-04-26 03:55:07 UTC
When bug 24631 will be in master, the file to edit will be:
/var/lib/koha/kohadev/plugins/Koha/Plugin/Com/ByWaterSolutions/KitchenSink/PLUGIN.yml
Comment 2 Aleisha Amohia 2021-01-10 22:59:34 UTC
Hi Victor, what should the message be instead?
Comment 3 Victor Grousset/tuxayo 2021-02-03 18:45:37 UTC
Found!

https://git.koha-community.org/Koha-community/Koha/src/commit/940c0e319a1df9fb2d218d816079b5f5034972f0/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt#L152

> Warning: This plugin was written for an older version of Koha. Run at your own risk.
Comment 4 Tomás Cohen Arazi 2022-03-09 11:28:58 UTC
Created attachment 131517 [details] [review]
Bug 25285: Fix wrong message about required Koha version in plugins

When you install a plugin that requires a newer Koha version, it reports
this:

<<
Warning: This report was written for a newer version of Koha. Run at your own risk.
>>

It is wrong in a couple ways:
- It is not a report.
- It feels like it dates back to when plugins were only run i.e.
  pre-hooks, etc.

This patch proposes a change to reflect this.

To test:
1. Verify the string changes make sense to you
2. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 5 Lucas Gass 2022-03-09 22:36:00 UTC
Created attachment 131531 [details] [review]
Bug 25285: Fix wrong message about required Koha version in plugins

When you install a plugin that requires a newer Koha version, it reports
this:

<<
Warning: This report was written for a newer version of Koha. Run at your own risk.
>>

It is wrong in a couple ways:
- It is not a report.
- It feels like it dates back to when plugins were only run i.e.
  pre-hooks, etc.

This patch proposes a change to reflect this.

To test:
1. Verify the string changes make sense to you
2. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 6 Martin Renvoize 2022-03-11 12:04:29 UTC
Created attachment 131585 [details] [review]
Bug 25285: Fix wrong message about required Koha version in plugins

When you install a plugin that requires a newer Koha version, it reports
this:

<<
Warning: This report was written for a newer version of Koha. Run at your own risk.
>>

It is wrong in a couple ways:
- It is not a report.
- It feels like it dates back to when plugins were only run i.e.
  pre-hooks, etc.

This patch proposes a change to reflect this.

To test:
1. Verify the string changes make sense to you
2. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize 2022-03-11 12:04:59 UTC
Lol, I've fixed this a few times over the years and it always seems to creep back in somehow.

Anywho.. passing QA
Comment 8 Fridolin Somers 2022-03-17 21:18:33 UTC
Maximum version text was fixed by Bug 21866.

This is no enhancement, I change to minor.
Comment 9 Fridolin Somers 2022-03-17 21:23:38 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 10 Kyle M Hall 2022-03-25 13:35:40 UTC
Pushed to 21.11.x for 21.11.05