Bug 15000 - Adding patron card images with duplicate descriptions causes data loss
Summary: Adding patron card images with duplicate descriptions causes data loss
Status: RESOLVED DUPLICATE of bug 17181
Alias: None
Product: Koha
Classification: Unclassified
Component: Label/patron card printing (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Deadline: 2017-06-14
Assignee: Chris Nighswonger
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-11 22:57 UTC by Liz Rea
Modified: 2017-06-21 13:19 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
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 Liz Rea 2015-10-11 22:57:54 UTC
Adding a patron card image with a duplicate description to an existing one saves the first one fine, but subsequent images with no description overwrite the initial image with no warning.

The work-around is to always give your images a unique description, but we shouldn't depend on the user to do this.
Comment 1 Liz Rea 2015-10-11 22:58:42 UTC
/cgi-bin/koha/patroncards/image-manage.pl 

This is the page I'm referring to.
Comment 2 Marc Véron 2016-02-10 14:20:08 UTC
Confirmed.

The instruction on the upload page reads:

Image name:
This will be the name by which you will refer to this image in the patron card layout editor. 

I think we could add something like:

Warning: The upload will replace images with the same name.
Comment 3 Liz Rea 2016-02-10 20:20:01 UTC
"but we shouldn't depend on the user to do this."

I really think we should not paper over this one.
Comment 4 Chris Nighswonger 2016-02-10 20:33:31 UTC
I agree with Liz, some quick validation should be run and a pop-up or some such presented with a warning confirming the overwrite.
Comment 5 Liz Rea 2016-02-10 20:45:41 UTC
Alternatively I suppose we could generate a unique description for each image if one is not provided.

I feel like we shouldn't ever be just losing data.
Comment 6 Marc Véron 2016-02-11 08:02:52 UTC
What should happen if somebody intentionally wants to replace the image?
Comment 7 Chris Nighswonger 2016-02-12 16:11:53 UTC
Probably the best resolution is to warn the user about the potential overwrite and let the user decide at that point whether to cancel and rename or proceed and overwrite.

Based on experience, it is very nice to be able to simply overwrite an image with a more recent one. However, some users may not anticipate that happening and so a warning needs to be in place.
Comment 8 MHH Chowdhury 2017-06-14 07:36:01 UTC
We receive many patrons with same names. If duplication of names overwrites then it will actually create data loss.  We are facing such problem and this becomes a major issue to rethink about koha. A library patron usually receives a card number which is unique. If the card numer is same then it can be overwriten. Can any one suggest us to customize as per our reuirement?
Comment 9 Marc Véron 2017-06-14 07:48:54 UTC
(In reply to MHH Chowdhury from comment #8)
> We receive many patrons with same names. If duplication of names overwrites
> then it will actually create data loss.  We are facing such problem and this
> becomes a major issue to rethink about koha. A library patron usually
> receives a card number which is unique. If the card numer is same then it
> can be overwriten. Can any one suggest us to customize as per our reuirement?

The issue described here is about additional images for the patron card (e.g. a logo of your library or a nice background).

The patron's image is taken from the patron's details. It is uploaded on the patron's detail page. (You have to set systempreference 'patronimages' to 'allow' to be able to upload patron images).
Comment 10 Marc Véron 2017-06-14 08:42:25 UTC
Just tested on current master: You get a warning if you want to upload an image with the same image name. It is no longer possible to accidentally overwrite it.

See Bug 17181 (Pushed to master for 17.05, not backported to 16.11.x

*** This bug has been marked as a duplicate of bug 17181 ***
Comment 11 MHH Chowdhury 2017-06-19 05:04:33 UTC
(In reply to Marc Véron from comment #10)
> Just tested on current master: You get a warning if you want to upload an
> image with the same image name. It is no longer possible to accidentally
> overwrite it.
> 
> See Bug 17181 (Pushed to master for 17.05, not backported to 16.11.x
> 
> *** This bug has been marked as a duplicate of bug 17181 ***

Thanks for your suggestions. We are using card numbers of patron images and it is not a problem for us. We are mainly facing problem when same names entered in fields Surname and first name. However, we found that many patrons are not giving their date of birth. We checked that by providing date of birth at present we can overcome the problem. Is this solution right?
Comment 12 Marc Véron 2017-06-21 13:19:39 UTC
(In reply to MHH Chowdhury from comment #11)
> (In reply to Marc Véron from comment #10)
> > Just tested on current master: You get a warning if you want to upload an
> > image with the same image name. It is no longer possible to accidentally
> > overwrite it.
> > 
> > See Bug 17181 (Pushed to master for 17.05, not backported to 16.11.x
> > 
> > *** This bug has been marked as a duplicate of bug 17181 ***
> 
> Thanks for your suggestions. We are using card numbers of patron images and
> it is not a problem for us. We are mainly facing problem when same names
> entered in fields Surname and first name. However, we found that many
> patrons are not giving their date of birth. We checked that by providing
> date of birth at present we can overcome the problem. Is this solution right?

I can not reproduce your issue, and I think it is not related to this Bug 15000.

Can you please file a new bug and describe step by step how to reproduce? 
Maybe adding some screenshots could help.