Bug 21665 - Advanced editor - Double clicking on value brings subfield code as well
Summary: Advanced editor - Double clicking on value brings subfield code as well
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal with 20 votes (vote)
Assignee: Cori Lynn Arnold
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-25 14:54 UTC by Cori Lynn Arnold
Modified: 2020-10-22 19:38 UTC (History)
3 users (show)

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


Attachments
Double Clicking field brings subcode (33.64 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-10-25 14:54 UTC, Cori Lynn Arnold
Details
Sample record (1.00 KB, text/plain)
2019-11-13 13:31 UTC, Cori Lynn Arnold
Details
Bug 21665: Advanced editor - double clicking on value brings subfield code as well (2.55 KB, patch)
2019-12-18 21:30 UTC, Cori Lynn Arnold
Details | Diff | Splinter Review
Bug 21665: Advanced editor - double clicking on value brings subfield code as well (2.81 KB, patch)
2020-01-22 22:58 UTC, Hayley Pelham
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Cori Lynn Arnold 2018-10-25 14:54:00 UTC
Created attachment 81165 [details]
Double Clicking field brings subcode

When highlighting subfield value, don't bring the subcode as well.

See document for details.
Comment 1 Cori Lynn Arnold 2019-11-13 13:30:53 UTC
To reproduce this issue:

1. Verify that the "Advanced Editor" for cataloging has been enabled by going to "Administration" from the home page and searching for "EnableAdvancedCatalogingEditor"

  Set this to "Enable" if it isn't already.

2. From the home page go to "Cataloging" 

3. Click on the button that says "Advanced editor"

4. Import the record attached to this bug by clicking on the "Import" button and navigating to the saved record

5. Double click on the number "9781541724389" and copy it from line starting with 020. 

6. Paste the result into notepad

Result:
a9781541724389

Expected Result:
9781541724389

The subfield should not be copied along with the data.
Comment 2 Cori Lynn Arnold 2019-11-13 13:31:26 UTC
Created attachment 95379 [details]
Sample record
Comment 3 Cori Lynn Arnold 2019-12-18 21:30:35 UTC
Created attachment 96465 [details] [review]
Bug 21665: Advanced editor - double clicking on value brings subfield code as well

To test, apply patch:
0/Verify that the advanced editor is enabled by going to
"Administration" and searching for "EnableAdvancedCatalogingEditor"
1/Set it to "Enable" if it isn't already.
2/Go to "Cataloging", click on "Advanced editor"
3/Search for a record by entering "specious" in the keyword box and
hitting enter
4/Click "import" on a record
5/For any subfield (maybe specifically the text in an 020 field) double
click on the text
6/Hit CNTRL-V into your favorite text editor, verify that the subfield
code was not pasted with the text from the subfield.
Comment 4 Cori Lynn Arnold 2019-12-18 21:31:26 UTC
To test, apply patch:
0/Verify that the advanced editor is enabled by going to
"Administration" and searching for "EnableAdvancedCatalogingEditor"
1/Set it to "Enable" if it isn't already.
2/Go to "Cataloging", click on "Advanced editor"
3/Search for a record by entering "specious" in the keyword box and
hitting enter
4/Click "import" on a record
5/For any subfield (maybe specifically the text in an 020 field) double
click on the text
6/Hit CNTRL-V into your favorite text editor, verify that the subfield
code was not pasted with the text from the subfield.
Comment 5 Cori Lynn Arnold 2019-12-30 11:19:49 UTC
Assign bug to self
Comment 6 Hayley Pelham 2020-01-22 22:58:37 UTC
Created attachment 97761 [details] [review]
Bug 21665: Advanced editor - double clicking on value brings subfield code as well

To test, apply patch:
0/Verify that the advanced editor is enabled by going to
"Administration" and searching for "EnableAdvancedCatalogingEditor"
1/Set it to "Enable" if it isn't already.
2/Go to "Cataloging", click on "Advanced editor"
3/Search for a record by entering "specious" in the keyword box and
hitting enter
4/Click "import" on a record
5/For any subfield (maybe specifically the text in an 020 field) double
click on the text
6/Hit CNTRL-V into your favorite text editor, verify that the subfield
code was not pasted with the text from the subfield.

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
On master Ctrl-C has been remapped to copy the current field to the
Advanced editor clipboard (Bug 17179). Remap this from Ctrl-C to Ctrl-E,
then you can use Ctrl-C to copy the double clicked field.
Comment 7 Katrin Fischer 2020-01-22 23:47:30 UTC
Hi Cori,

this works for me only using keyboard shortcuts:

- double click subfield text
- ctrl + c (remap Copy field action in the editor before, so you get normal behaviour)
- ctrl + v = only text was copied

But it doesn't work if I avoid the shortcuts:

- double click subfield text
- right click - context menu - copy
- ctrl + v or ctrl + p = subfield code was copied

Could you please check/fix/comment?
Comment 8 Heather 2020-06-26 15:34:34 UTC
I would really like to see work on this advance, as the new functionality in 19.11 with the Advanced Biblio Editor's only being able to copy an entire subfield or copy an entire field has really "broken" my cataloging workflow.

The main problem that I'm having is that I can no longer highlight a portion of a subfield--I can no longer highlight just a bit of text for copying/pasting in the ABE (Advanced Bibliographic Editor...see, I like to keyboard things short and fast...)  I need to highlight to copy a whole field only a few times a day, and I need to highlight to copy an entire subfield a couple of times a month, but I want to highlight-copy-paste a portion of text dozens if not hundreds of times a day, e.g.:

Just typed the author's name in the 245 $c, so I will highlight the most complicated/likely to have typos/unique portion of their name element for pasting into the search box to search authorities.  (I have authorities open in another tab for searching & copy/paste from that tab into the ABE--any of the searching/linking functions from within the ABE are too cumbersome and slow.)  But...oh, yeah...I can't highlight any *portion* of the 245 $c anymore.

Just typed the 505 contents note and want to copy/paste as above for concepts that are candidates for subject headings but...oh, yeah...I can't highlight just one word in from one of the $t (title) fields.

Just typed a city in the 264 and I'd like to use it in geographic subfields, but in the 264 $a (a transcription field), it's "San Francisco, CA" so I want to copy just "San Francisco" to make that an entire $z in a 6XX field but, oh, right, I can't copy just a portion of a field.  I can copy the whole $a and then backspace to delete the "CA" which adds keystrokes.  I don't like added keystrokes.  Added keystrokes make catalogers go cranky-pants.

These are just some of the instances where I want to highlight just a portion of a subfield.  I could go on and on and on.  Real Catalogers Who Have Taken The Red Pill Of MARC21 To Use The ABE For What It Is *love love love* keyboarding because it's all about the speed, babies--our minds are creating that MARC21 record at the Speed of Thought and our hands need to go as fast as possible with using Absolute Tons and Tons of shift-back-arrow-until-word-is-highlighted (maybe occasionally reaching for a mouse but not often because mousing is sssslllloooowwwer) and then wanting to...yes...ctrl-c to copy!  Copy!!  Copy it to the clipboard so you can paste it later!!  All this copying/pasting is used to help avoid typos because typos are One Of The Enemies!  We hates typos, my preciousssss yessss we hatesss them!!!  The typos and the slow mousing stand in the way of public services getting the library materials into the waiting hands of the users so we Catalogers must type the original records as fast as we can!!!  Edit as fast as we can!!!

So could we please, pretty please, with whipped cream, chocolate sprinkles, hundreds and thousands, nonpareils, and many cherries and chopped peanuts on top, restore the ability to copy a portion of text within the ABE to the clipboard?  It's now what I want most out of Koha.  I'll wait for anything else that you have if I can have this back.

I'm wiping my brow and opening Connexion Client because I just really can't use the ABE until I get this functionality back.
Comment 9 Heather 2020-06-30 21:12:07 UTC
I've run into another very typical example (especially lately) of when I want to highlight & copy a portion of text while in the Advanced Biblio Editor--it's for an online resource, and in the middle of editing the record I discover something else that might need fixing/changing, so I want to look at the online item, but I can't just highlight then copy just the link text under 19.11--I can ctrl-shift-c to copy the entire subfield, but this only copies it into the Koha clipboard (not the OS clipboard) unavailable for pasting into the OS clipboard--plus it has a delimiter-u at the front of the URL.

I have to, e.g., use the mouse to select "View" to open the record in a new browser tab, then use the mouse to select the "Online resources" link to open the resource in yet another browser tab.

It would be faster for me to be able to go back to highlighting the URL while in the record that I'm editing, ctrl-c (to copy to the OS clipboard), ctrl-t for a new tab, ctrl-v to paste the URL from the OS clipboard and see the resource.

So it's not just highlighting a subfield & bringing the subfield value that's a problem--it's the ability that interacting with the OS clipboard has been eliminated that's a big problem.  A cataloger in the Advanced Bib Editor needs the ability to send *exactly what they want to* to the Koha clipboard and/or the OS clipboard.
Comment 10 Cori Lynn Arnold 2020-06-30 23:04:50 UTC
Hey Heather! I hear your frustration. One thing we did here to help was to remove the "Control-C" from the default for our Koha installations (we have over 20). To do that:

1. Go to the Advanced Editor
2. Click on the "Keyboard Shortcuts" button
3. Click on the link for "Refine shortcuts"
4. Either delete or redefine what is in that first box for "Copy current field"

If you don't have permissions to do that, talk to your Koha Admin. That was a good start for us. Hope that helps.
Comment 11 Heather 2020-07-01 16:52:59 UTC
Hi, Cori!

Thank you--yes, I'm aware of (and can, and have already been) redefining the shortcut keys, but that doesn't address the issue that started the ticket, that the subfield delimiter letter was always copied when "double-clicked" and now nothing is able to be selectively copied when double-clicked in the Advanced Editor--the only ability now under 19.11 is copy an entire subfield (with the delimiter character and delimited letter) into the Koha clipboard only.

This bug also was created to copy the double-clicked text into Notepad, and that's now impossible as well without the ability to copy from the Advanced Editor into the OS clipboard.

Or am I missing something?  I haven't seen how changing/redefining the keyboard shortcut can change the ability to copy double-clicked (or otherwise highlighted text that is less than an entire subfield) into, e.g., Notepad or other app via the OS clipboard?

Thanks!!  --h2

(In reply to Cori Lynn Arnold from comment #10)
> Hey Heather! I hear your frustration. One thing we did here to help was to
> remove the "Control-C" from the default for our Koha installations (we have
> over 20). To do that:
> 
> 1. Go to the Advanced Editor
> 2. Click on the "Keyboard Shortcuts" button
> 3. Click on the link for "Refine shortcuts"
> 4. Either delete or redefine what is in that first box for "Copy current
> field"
> 
> If you don't have permissions to do that, talk to your Koha Admin. That was
> a good start for us. Hope that helps.
Comment 12 Katrin Fischer 2020-10-20 03:07:19 UTC
(In reply to Katrin Fischer from comment #7)
> Hi Cori,
> 
> this works for me only using keyboard shortcuts:
> 
> - double click subfield text
> - ctrl + c (remap Copy field action in the editor before, so you get normal
> behaviour)
> - ctrl + v = only text was copied
> 
> But it doesn't work if I avoid the shortcuts:
> 
> - double click subfield text
> - right click - context menu - copy
> - ctrl + v or ctrl + p = subfield code was copied
> 
> Could you please check/fix/comment?

Having a case of second thoughts here... Heather and others - how important is that bit to you? (context menu behaviour?)
Comment 13 Heather 2020-10-20 14:48:55 UTC
Hi, Katrin!

It is a problem.  Default behavior is usually that a double-click will just highlight one word, and in my cataloging experience, one *never* wants the word accompanied by the letter of any preceding subfield delimiter.

The more uncommon behavior is to want the entire subfield delimiter along with the word, and that can be manually highlighted using the mouse, "grabbing" the delimiter, subfield letter, and the word.

The existing behavior is really inconsistent, because if you double-click a word preceded by a subfield delimeter, you get/highlight/copy the word plus the letter from the subfield.  But if you double-click a word followed by a subfield delimiter (e.g., life‡v) you highlight/copy only the word without the delimiter.

The behavior right now is that double-clicking a word with a subfield delimiter to its left without a space also captures the letter from the subfield delimiter, but double-clicking a word with a subfield delimiter to its right without a space does NOT capture the delimiter.  That is, double-clicking a word with a subfield delimiter to its left also captures one additional character from the subfield, but double-clicking a word with a subfield delimiter to its right does NOT capture one additional character from the subfield.

So for consistent behavior, more in line with other cataloging programs and software, double-clicking a word should just not capture any characters from subfield delimiters adjacent to the word.  I.e., double-clicking a word with a subfield delimiter adjacent to it on the right is correct behavior, and right now double-clicking a word with a subfield delimiter adjacent to it on the left is NOT correct behavior.

Does that make sense?
Comment 14 Katrin Fischer 2020-10-20 14:51:07 UTC
Hi, I think my question was misleading. I tested this patch and failed it, because it worked using the shortcut keys, but not if you used the contex menu (right click - copy etc.). Should we consider this patch anyway?
Comment 15 Heather 2020-10-20 15:21:58 UTC
Oh, sorry, Katrin--I misunderstood!

Yes, please, consider this patch anyway.  When the keyboard shortcut behavior was divorced from the OS's keyboard shortcut behavior, IMO, that set a precedent.  So I think it's OK for it to work with the shortcut keys and not work with the context menu--I think that is the same as a behavior working with Koha's shortcut keys but not working with the OS's shortcut keys/context (right-click) menu.

Catalogers using Koha's ABE are already familiar with shortcut key behavior not matching the OS behavior, so I don't think the shortcut key behavior being different from the context menu/right-click behavior should hold it up.

Thank you!!
Comment 16 Katrin Fischer 2020-10-21 00:09:27 UTC
Heather or someone else interested in this one and working with the advanced editor - could you please test this and sign off to let me know if it solves your issues? I've tested that the patch still applies.
Comment 17 Heather 2020-10-22 18:18:51 UTC
Happy to, Katrin!  I'll work on signing off on it this afternoon.
Comment 18 Heather 2020-10-22 19:12:23 UTC
Unfortunately, it's not working.  I followed this test plan exactly:
To test, apply patch:
0/Verify that the advanced editor is enabled by going to
"Administration" and searching for "EnableAdvancedCatalogingEditor"
1/Set it to "Enable" if it isn't already.
2/Go to "Cataloging", click on "Advanced editor"
3/Search for a record by entering "specious" in the keyword box and
hitting enter
4/Click "import" on a record
5/For any subfield (maybe specifically the text in an 020 field) double
click on the text

----This is where it failed.  The exact keyboard shortcut ctrl-c would not copy the highlighted text.  I then verified that it was working in my Koha catalog--it is.  So I redefined the keyboard shortcut in the sandbox as Hayley mentions to do, to ctrl-e, and tried again, and it still wouldn't copy with the keyboard shortcut ctrl-e.  I got the exact same behavior in Firefox and Chrome with my sandbox.  (The remapping of the keyboard shortcut to ctrl-e persisted from Firefox to Chrome.)  I could get the highlighted term copied with right-clicking (in Windows) & selecting "copy" from that pop-up menu, which did copy with the initial letter of the subfield code as predicted, so that's still working.  But copying with shortcut keys didn't work.  Other keyboard shortcuts worked, e.g., "ctrl-shift-c" to copy current subfield worked.
Comment 19 Katrin Fischer 2020-10-22 19:38:14 UTC
:(