Bug 6707 - Add alternative, textual MARC editor
Summary: Add alternative, textual MARC editor
Status: RESOLVED DUPLICATE of bug 11559
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: master
Hardware: All All
: PATCH-Sent (DO NOT USE) enhancement (vote)
Assignee: Jesse Weaver
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-11 06:34 UTC by Jesse Weaver
Modified: 2014-05-17 16:09 UTC (History)
8 users (show)

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


Attachments
Bug 6707 - Add textual MARC editor (228.15 KB, patch)
2011-08-11 06:50 UTC, Jesse Weaver
Details | Diff | Splinter Review
Saved text file of the MARC record opened by the editor (1.26 KB, text/plain)
2011-08-19 14:38 UTC, Owen Leonard
Details
Bug 6707 - Add textual MARC editor (228.15 KB, patch)
2011-08-23 11:47 UTC, Jesse Weaver
Details | Diff | Splinter Review
Bug 6707 - Add textual MARC editor (229.52 KB, patch)
2012-06-09 11:18 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Weaver 2011-08-11 06:34:28 UTC
The default MARC editor is good for beginning catalogers, but gets in the way of those that have more experience. This editor is fairly bare-bones, but works if you know MARC well.
Comment 1 Jesse Weaver 2011-08-11 06:50:45 UTC Comment hidden (obsolete)
Comment 2 Magnus Enger 2011-08-15 14:13:11 UTC
Should this have "Needs signoff" status?
Comment 3 Owen Leonard 2011-08-15 18:58:26 UTC
I get this error when I open an existing file, make a minor edit (author's name), and click save:

Watch your language: Error on line 12: expected space after subfield code, got 'newline' at /usr/share/perl/5.10/CGI/Carp.pm line 356 CGI::Carp::realdie('Error on line 12: expected space after subfield code, got \'n...') called at /usr/share/perl/5.10/CGI/Carp.pm line 437 CGI::Carp::die('Error on line 12: expected space after subfield code, got \'n...') called at /home/oleonard/kohaclone/C4/Biblio.pm line 2336 C4::Biblio::error('expected space after subfield code, got \'\x{a}\'') called at /home/oleonard/kohaclone/C4/Biblio.pm line 2237 C4::Biblio::__ANON__() called at /home/oleonard/kohaclone/C4/Biblio.pm line 2341 C4::Biblio::TransformTextToMarc('000 00738nam a2200253 4500\x{a}001 63291\x{a}003 ONe\x{a}005 2011070709...', 'existing_record', 'MARC::Record=HASH(0xa2029a0)') called at /home/oleonard/kohaclone/cataloguing/addbiblio-text.pl line 449 eval {...} called at /home/oleonard/kohaclone/cataloguing/addbiblio-text.pl line 448
Comment 4 Jesse Weaver 2011-08-18 18:11:16 UTC
Thanks for testing this, Owen. Would you be able to save the exact text you see in the editor to a text file and attach it? The editor is probably outputting the record incorrectly.
Comment 5 Owen Leonard 2011-08-19 14:38:38 UTC
Created attachment 5061 [details]
Saved text file of the MARC record opened by the editor

Since I don't know whether the error message's relation to the record is important or not I'm pasting the error I got from the specific record I'm attaching:

    Watch your language: Error on line 14: expected space after subfield code, got 'newline' at /usr/share/perl/5.10/CGI/Carp.pm line 356 CGI::Carp::realdie('Error on line 14: expected space after subfield code, got \'n...') called at /usr/share/perl/5.10/CGI/Carp.pm line 437 CGI::Carp::die('Error on line 14: expected space after subfield code, got \'n...') called at /home/oleonard/kohaclone/C4/Biblio.pm line 2336 C4::Biblio::error('expected space after subfield code, got \'\x{a}\'') called at /home/oleonard/kohaclone/C4/Biblio.pm line 2237 C4::Biblio::__ANON__() called at /home/oleonard/kohaclone/C4/Biblio.pm line 2341 C4::Biblio::TransformTextToMarc('000 01400nim a2200373 a 4500\x{a}001 npl08006873\x{a}003 ONe\x{a}005 2011...', 'existing_record', 'MARC::Record=HASH(0xb6ad178)') called at /home/oleonard/kohaclone/cataloguing/addbiblio-text.pl line 449 eval {...} called at /home/oleonard/kohaclone/cataloguing/addbiblio-text.pl line 448
Comment 6 Jesse Weaver 2011-08-23 11:47:51 UTC Comment hidden (obsolete)
Comment 7 Jesse Weaver 2011-08-23 11:48:38 UTC
New version of the patch. This should fix the bug Owen noticed.
Comment 8 Owen Leonard 2011-08-24 14:17:18 UTC
Thanks Jesse, I get no errors now from the minor edits I'm trying now.
Comment 9 Owen Leonard 2011-08-24 14:25:45 UTC
How to offer users the choice of which editor they want without setting a system-wide preference? My professional catalogers might prefer this version, but my circ staff who are adding ILL items using a brief framework will not. 

We still don't have an infrastructure for per-user preferences. Barring that, I wonder if the whole MARC editor could be AJAX-loaded depending on a cookie set in the cataloging interface somewhere?

I would also add the ability to resize the editor iFrame--something that should be easy when jQueryUI gets integrated in the future.
Comment 10 Nicole C. Engard 2011-08-25 02:48:43 UTC
Since we don't have user specific preferences right now, couldn't we offer both editors? Just under cataloging have a 'professional editor' and 'text editor' option for catalogers to pick from.
Comment 11 Jesse Weaver 2011-09-12 06:00:30 UTC
Quick followup: I definitely like the idea of a smoother way to choose between the two editors, especially once we have more infrastructure to support it. Do you think the patch is good for signoff as it is, though?
Comment 12 Nicole C. Engard 2011-09-29 14:52:31 UTC
Bug 6707 - Add textual MARC editor
Apply? [yn] y

Applying: Bug 6707 - Add textual MARC editor
error: patch failed: cataloguing/addbiblio.pl:836
error: cataloguing/addbiblio.pl: patch does not apply
error: installer/data/mysql/en/mandatory/sysprefs.sql: does not exist in index
error: patch failed: installer/data/mysql/updatedatabase.pl:4432
error: installer/data/mysql/updatedatabase.pl: patch does not apply
Patch failed at 0001 Bug 6707 - Add textual MARC editor
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".
Patch left in /tmp/Bug-6707---Add-textual-MARC-editor-z8sLSX.patch
nengard@debian:~/kohaclone$
Comment 13 Kyle M Hall 2012-06-09 11:18:25 UTC
Created attachment 10014 [details] [review]
Bug 6707 - Add textual MARC editor

Add an alternate MARC editor, which allows entering biblios in a textual
format. This allows a faster workflow for experienced catalogers.

Possible improvements:
  * Remove untranslateable strings from code
  * Replace parser with simpler version, if possible
  * Remove ugly redirect-hack

Known problems:
  * Does not support authorities. Adding this would be quite complicated.
  * Also not authorized values. Would be tough, but doable.
Comment 14 Frédéric Demians 2012-07-10 17:42:44 UTC
There is a minor and easy to fix merge conflict when applying this patch
to HEAD.

After that, the data entry in text mode works smoothly. I agree that
it is a very intersting editor for experienced cataloger, which can
replace with benefits the 'normal' (or not so) editor.

But the Save button doesn't work for me, without any warning or error
message. I may have forgotten to fill mandatory field.

There is still this issue that the text mode is activated via a
syspref. It really must be a per cataloger choice. Ower suggestion to
select the editor with a cookie is intersting... The choice could also
be done via cataloger category: a syspref could list the patron
categories of users cataloging in text mode.
Comment 15 Katrin Fischer 2012-07-10 17:51:41 UTC
I think there might be cases where a cataloger wants to use a text based editor and others, until the text based supports all features needed, the current editor might be better. I was thinking we could maybe provide links to both cataloguing interfaces side by side - so both can be used without having to decide for one.
Comment 16 Frédéric Demians 2012-07-10 17:59:28 UTC
> I was thinking we could maybe provide links to both cataloguing
> interfaces side by side - so both can be used without having to decide
> for one.

+1
Comment 17 Owen Leonard 2012-08-07 14:42:35 UTC
Patch still applies with minor conflict revisions. Testing one quick change to an existing record (just changing words in 245a) I couldn't save the record. Clicking the save button didn't appear to do anything, but this error was in the log:

addbiblio-text.pl: Can't call method "param" on unblessed reference at /home/oleonard/kohaclone/C4/Biblio.pm line 2326

A revised version of this patch should correct the error *and* offer some error-handling so that the user can be told something went wrong.
Comment 18 Katrin Fischer 2014-05-17 11:17:30 UTC
Jesse, can we close this a duplicate?
Comment 19 Jesse Weaver 2014-05-17 16:09:25 UTC
(In reply to Katrin Fischer from comment #18)
> Jesse, can we close this a duplicate?

Yes, definitely.

*** This bug has been marked as a duplicate of bug 11559 ***