Bug 33189

Summary: Plugin upload should prompt for .kpz files
Product: Koha Reporter: David Cook <dcook>
Component: Plugin architectureAssignee: David Cook <dcook>
Status: CLOSED FIXED QA Contact: Martin Renvoize (ashimema) <martin.renvoize>
Severity: minor    
Priority: P5 - low CC: arthur.suzuki, lucas, martin.renvoize, wainuiwitikapark
Version: Main   
Hardware: All   
OS: All   
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
Bug 33189: Make plugin upload look for .kpz files in file picker

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