Bug 17879 - Possible to upload images with no image name
Summary: Possible to upload images with no image name
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Label/patron card printing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor (vote)
Assignee: Aleisha Amohia
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-10 22:20 UTC by Aleisha Amohia
Modified: 2018-06-04 20:10 UTC (History)
4 users (show)

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


Attachments
Bug 17879: Use image filename if no image name is entered (1.42 KB, patch)
2017-01-10 22:23 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 17879: Use image filename if no image name is entered (1.48 KB, patch)
2017-01-11 07:51 UTC, Claire Gravely
Details | Diff | Splinter Review
Bug 17879: Use image filename if no image name is entered (1.55 KB, patch)
2017-01-11 08:59 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Aleisha Amohia 2017-01-10 22:20:31 UTC
This is a problem because the image name is used in the patron card layout editor, and if a person uploads a bunch of images with no names then it will be difficult to tell which image is which.
Comment 1 Aleisha Amohia 2017-01-10 22:23:33 UTC
Created attachment 58788 [details] [review]
Bug 17879: Use image filename if no image name is entered

This patch changes the code to use the filename of the uploaded image if
no specific image name is entered.

To test:
1) Go to Tools -> Patron card creator -> Manage images
2) Upload an image and leave the image name field empty
3) Notice this works and 'Name' is left empty.
4) Apply patch and refresh page
5) Upload an image and leave the image name field empty
6) Notice the image name is given the filename so that 'Name' is no
longer empty.

Sponsored-by: Catalyst IT
Comment 2 Claire Gravely 2017-01-11 07:51:46 UTC
Created attachment 58795 [details] [review]
Bug 17879: Use image filename if no image name is entered

This patch changes the code to use the filename of the uploaded image if
no specific image name is entered.

To test:
1) Go to Tools -> Patron card creator -> Manage images
2) Upload an image and leave the image name field empty
3) Notice this works and 'Name' is left empty.
4) Apply patch and refresh page
5) Upload an image and leave the image name field empty
6) Notice the image name is given the filename so that 'Name' is no
longer empty.

Sponsored-by: Catalyst IT
Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Comment 3 Jonathan Druart 2017-01-11 08:59:08 UTC
Created attachment 58798 [details] [review]
Bug 17879: Use image filename if no image name is entered

This patch changes the code to use the filename of the uploaded image if
no specific image name is entered.

To test:
1) Go to Tools -> Patron card creator -> Manage images
2) Upload an image and leave the image name field empty
3) Notice this works and 'Name' is left empty.
4) Apply patch and refresh page
5) Upload an image and leave the image name field empty
6) Notice the image name is given the filename so that 'Name' is no
longer empty.

Sponsored-by: Catalyst IT
Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Kyle M Hall 2017-01-13 11:45:32 UTC
Pushed to master for 17.05, thanks Aleisha!
Comment 5 Katrin Fischer 2017-01-15 17:49:43 UTC
Reclassifying this to be a bug - 
This patch has been pushed to 16.11.x and will be in 16.11.02.
Comment 6 Julian Maurice 2017-01-19 15:09:21 UTC
Pushed to 3.22.x for 3.22.15
Comment 7 Mason James 2017-01-27 03:05:00 UTC
Pushed to 16.05.x, for 16.05.08 release