Bug 9177 - Duplicate patron: Prepopulated fields are cleared when setting cursor
Summary: Duplicate patron: Prepopulated fields are cleared when setting cursor
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low trivial (vote)
Assignee: Owen Leonard
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-29 22:05 UTC by Marc Véron
Modified: 2015-06-04 23:33 UTC (History)
5 users (show)

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


Attachments
Screenshot Duplicate patron - prepopulated fields cleared (121.85 KB, image/jpeg)
2012-11-29 22:05 UTC, Marc Véron
Details
Bug 9177 - Duplicate patron: Prepopulated fields ar cleared when setting cursor (19.28 KB, patch)
2014-11-11 16:24 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 9177 - Duplicate patron: Prepopulated fields ar cleared when setting cursor (19.85 KB, patch)
2014-11-20 01:34 UTC, Mark Tompsett
Details | Diff | Splinter Review
[SIGNED OFF] Bug 9177 - Duplicate patron: Prepopulated fields ar cleared when setting cursor (19.92 KB, patch)
2014-11-20 01:38 UTC, Mark Tompsett
Details | Diff | Splinter Review
[PASSED QA] Bug 9177 - Duplicate patron: Prepopulated fields ar cleared when setting cursor (20.08 KB, patch)
2014-11-20 07:04 UTC, Katrin Fischer
Details | Diff | Splinter Review
[REBASED] Bug 9177 - Duplicate patron: Prepopulated fields ar cleared when setting cursor (20.28 KB, patch)
2014-11-20 17:38 UTC, Mark Tompsett
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Véron 2012-11-29 22:05:31 UTC
Created attachment 13790 [details]
Screenshot Duplicate patron - prepopulated fields cleared

How to reproduce:

1) Go to a patron's detail page
2) Click "Duplicate"
3) On the screen, click in one of the prepopulated fields, e.g. Surname or City

Result: The field is cleared.
Expected: Cursor is set without clearing the field.

Is this a bug or is it by design?
Comment 1 Owen Leonard 2014-07-17 09:40:46 UTC
This is by design. I think the idea is that you don't click those fields if the data is correct. If the data is incorrect you want to replace it, so clearing is helpful.

It's easy to see the downside: If you use the keyboard to navigate through the form you'll end up clearing all the existing data.

I don't know that I've ever used the duplicate feature in production, but I would think that downside is pretty significant, not to mention being an accessibility problem for users who can't use a mouse.

Is this a feature we really need to keep?
Comment 2 Katrin Fischer 2014-11-09 22:32:10 UTC
It feels like unexpected behaviour to me - might be more irritating than helpful.
Comment 3 Owen Leonard 2014-11-11 16:24:12 UTC Comment hidden (obsolete)
Comment 4 Mark Tompsett 2014-11-20 01:34:30 UTC Comment hidden (obsolete)
Comment 5 Mark Tompsett 2014-11-20 01:38:08 UTC Comment hidden (obsolete)
Comment 6 Mark Tompsett 2014-11-20 01:41:43 UTC
As a side comment, I don't think all the fields that should be cleared when you duplicate are cleared, but that is not within the scope of this bug.
Comment 7 Katrin Fischer 2014-11-20 07:04:31 UTC Comment hidden (obsolete)
Comment 8 Owen Leonard 2014-11-20 12:57:12 UTC
(In reply to M. Tompsett from comment #6)
> As a side comment, I don't think all the fields that should be cleared when
> you duplicate are cleared, but that is not within the scope of this bug.

That sounds like Bug 7878 - When duplicating a patron too many fields carrying over - a fix for which was just pushed.
Comment 9 Owen Leonard 2014-11-20 15:24:25 UTC
Patch doesn't apply anymore, presumably because of the changes made by the QA follow-up to Bug 7878.
Comment 10 Mark Tompsett 2014-11-20 17:38:12 UTC
Created attachment 33753 [details] [review]
[REBASED] Bug 9177 - Duplicate patron: Prepopulated fields ar cleared when setting cursor

When adding a duplicated patron record some fields are prepopulated from
the original patron record. Focusing your cursor on these fields
automatically clears them. This works well if you assume that the user
only focuses on fields which should be changed. This works badly if you
consider that a user might want to tab between all fields. I think the
disadvantages outweigh the minor benefit of not having to delete the
contents of a field.

This patch removes the clearing action.

TEST PLAN
---------
1) Log in to staff client
2) Patrons
3) Find an existing patron
4) Click on the link in the Name column
5) Click on the Duplicate button
6) Click on fields with data in them.
   -- they will clear, which is more problematic than correcting
      the entry.
7) On the line
   "Home > Patrons > {patron name} > Duplicate Adult Patron"
   click the patron name to go back.
8) Click on the Duplicate button
9) Tab through the fields
   -- the fields should remain unchanged, but sadly they clear.
10) Apply the patch
11) On the line
   "Home > Patrons > {patron name} > Duplicate Adult Patron"
   click the patron name to go back.
12) Click on the Duplicate button
13) Navigate through the fields
    -- tabbing nor clicking should clear any fields.
14) Run koha qa tests

NOTE: Had to rebase again. Yes, bug 7878 interfered.
      However, it deals with comment #6, which Owen
      appropriately noted.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Less surprises, improves accessibility by enabling to
tab through the form without losing data.

NOTE: Set back to Passed QA from Patch doesn't apply.
Comment 11 Tomás Cohen Arazi 2014-11-21 22:54:57 UTC
Patch pushed to master.

Thanks Owen!