Summary: | Add alternative, textual MARC editor | ||
---|---|---|---|
Product: | Koha | Reporter: | Jesse Weaver <pianohacker> |
Component: | Cataloging | Assignee: | Jesse Weaver <pianohacker> |
Status: | RESOLVED DUPLICATE | QA Contact: | Bugs List <koha-bugs> |
Severity: | enhancement | ||
Priority: | PATCH-Sent (DO NOT USE) | CC: | f.demians, jwagner, jweaver, koha.sekjal, kyle.m.hall, magnus, nengard |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Attachments: |
Bug 6707 - Add textual MARC editor
Saved text file of the MARC record opened by the editor Bug 6707 - Add textual MARC editor Bug 6707 - Add textual MARC editor |
Description
Jesse Weaver
2011-08-11 06:34:28 UTC
Created attachment 4956 [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. Should this have "Needs signoff" status? 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 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. 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
Created attachment 5101 [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. New version of the patch. This should fix the bug Owen noticed. Thanks Jesse, I get no errors now from the minor edits I'm trying now. 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. 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. 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? 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$ 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. 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. 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. > 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
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. Jesse, can we close this a duplicate? (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 *** |