Bug 33189 - Plugin upload should prompt for .kpz files
Summary: Plugin upload should prompt for .kpz files
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Plugin architecture (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: David Cook
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-10 05:20 UTC by David Cook
Modified: 2023-12-28 20:43 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.04,22.05.11,21.11.19
Circulation function:


Attachments
Bug 33189: Make plugin upload look for .kpz files in file picker (1.78 KB, patch)
2023-03-10 05:25 UTC, David Cook
Details | Diff | Splinter Review
Bug 33189: Make plugin upload look for .kpz files in file picker (1.84 KB, patch)
2023-03-10 08:27 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2023-03-10 05:20:53 UTC
At the moment, when you click "Choose file" when uploading a plugin, it looks for "All Files (*.*)", but really we only ever want "*.kpz" files. 

By changing the HTML we should be able to make it only look for "*.kpz" files which should make uploads a bit more convenient.
Comment 1 David Cook 2023-03-10 05:25:58 UTC
Created attachment 148046 [details] [review]
Bug 33189: Make plugin upload look for .kpz files in file picker

This change configures the file picker to look for *.kpz files instead
of *.* files, which makes it more convenient to locate .kpz files
for upload when uploading plugins.

Test plan:
0. Apply patch
1. Go to http://localhost:8081/cgi-bin/koha/plugins/plugins-upload.pl
2. Click on "Choose file"
3. Note that the file type in the box at the bottom right of the screen
defaults to "KPZ File (*.kpz)
4. If you navigate to a directory that contains .kpz files (like Downloads),
you'll now see directory folders and .kpz files.
Comment 2 Martin Renvoize (ashimema) 2023-03-10 08:27:27 UTC
Created attachment 148049 [details] [review]
Bug 33189: Make plugin upload look for .kpz files in file picker

This change configures the file picker to look for *.kpz files instead
of *.* files, which makes it more convenient to locate .kpz files
for upload when uploading plugins.

Test plan:
0. Apply patch
1. Go to http://localhost:8081/cgi-bin/koha/plugins/plugins-upload.pl
2. Click on "Choose file"
3. Note that the file type in the box at the bottom right of the screen
defaults to "KPZ File (*.kpz)
4. If you navigate to a directory that contains .kpz files (like Downloads),
you'll now see directory folders and .kpz files.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 3 Martin Renvoize (ashimema) 2023-03-10 08:27:57 UTC
Trivial code change, nice fix.. going straight for QA.

Passing
Comment 4 Tomás Cohen Arazi (tcohen) 2023-03-10 13:24:21 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 5 Matt Blenkinsop 2023-03-10 16:26:40 UTC
Nice work everyone!

Pushed to stable for 22.11.x
Comment 6 Lucas Gass (lukeg) 2023-03-14 20:28:28 UTC
Backported to 22.05.x for upcoming 22.05.11
Comment 7 Arthur Suzuki 2023-03-30 07:49:58 UTC
applied to 21.11 for 21.11.19
Comment 8 Wainui Witika-Park 2023-04-27 05:54:54 UTC
Not backported to 21.05.x