Bug 36151 - Update leaflet.js to current version
Summary: Update leaflet.js to current version
Status: Patch doesn't apply
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Thomas Klausner
QA Contact: Testopia
URL: https://github.com/domm/Koha/commit/d...
Keywords: rel_24_05_candidate
Depends on:
Blocks: 31652
  Show dependency treegraph
 
Reported: 2024-02-22 13:54 UTC by Thomas Klausner
Modified: 2024-05-06 09:42 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Klausner 2024-02-22 13:54:08 UTC
Koha comes with leaflet.js 1.0.3 which is quite old.

We need a current leaflet for Bug 31652, so we propose to upgrade to the current version 1.9.4
Comment 1 Thomas Klausner 2024-02-22 15:35:04 UTC
The patch is too big for bugzilla, please find it here:

https://github.com/domm/Koha/commit/baa24a31d61e2435dc287c0f39646cf7dc2ad49e

Bug 36151: Update leaflet.js

Koha currently comes with leaflet.js 1.0.3 which is quite old (2017).
For GeoSearch (Bug 31652) we need a more current leaflet.js, so this
patch updates leaflet.js to the current version 1.9.4

Test plan:

* Go to staff /cgi-bin/koha/admin/usage_statistics.pl where you see a
  map and can set the location of the library by clicking on the map.
* Apply the patch
* Again, go to staff /cgi-bin/koha/admin/usage_statistics.pl
* Do a complete reload of the page
* It should still work:
  * Display the location as a pin
  * Set a new location

There was no code change necessary besides downloading the current
version of leaflet.js

Sponsored-by: Geosphere Austria
Comment 2 Owen Leonard 2024-02-22 18:14:13 UTC
(In reply to Thomas Klausner from comment #1)
> There was no code change necessary besides downloading the current
> version of leaflet.js

The about page will need an update to change the number where it says "Leaflet JavaScript library v1.0.3."

I have tried where possible to link the license information for that particular release, e.g. https://github.com/Leaflet/Leaflet/blob/v1.9.4/LICENSE, since it's possible licenses could change.
Comment 3 Thomas Klausner 2024-02-23 08:10:10 UTC
New patch including an update About-page (new version, link to current LICENSE) is available here:

https://github.com/domm/Koha/commit/dfa518981fd8327e4ec07ad726496267018b140b

Bug 36151: Update leaflet.js

Koha currently comes with leaflet.js 1.0.3 which is quite old (2017).
For GeoSearch (Bug 31652) we need a more current leaflet.js, so this
patch updates leaflet.js to the current version 1.9.4

Test plan:

* Go to staff /cgi-bin/koha/admin/usage_statistics.pl where you see a
  map and can set the location of the library by clicking on the map.
* Apply the patch
* Again, go to staff /cgi-bin/koha/admin/usage_statistics.pl
* Do a complete reload of the page
* It should still work:
  * Display the location as a pin
  * Set a new location

There was no code change necessary besides downloading the current
version of leaflet.js and updating the about-page

Sponsored-by: Geosphere Austria
Comment 4 Lucas Gass 2024-04-11 09:45:15 UTC
This works without issue, signing off.
Comment 5 Lucas Gass 2024-04-11 09:48:03 UTC
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 6 Pedro Amorim 2024-04-23 14:26:51 UTC
The about.tt change needs a rebase after bug 32693
Comment 7 Katrin Fischer 2024-05-06 09:24:31 UTC
I notice that this uses: 
Sponsored-by: Geosphere Austria

But bug 31652 uses:
Geosphere - https://www.geosphere.at/

This will require mappings to make it look nice in Release notes. Please stick to one spelling :)
Comment 8 Katrin Fischer 2024-05-06 09:42:46 UTC
Hm, I rebased this, it's quite easy: just kick out the changes in about .pl and re-do them: it's just changing the version number.

But of course it's still too large for bugzilla and I currently have no public repo I can push it to and not sure I should use our main repository for this ;)

Could someone else take over here?