Skip to content

How to reprocess Marc records as if they were edited? And creating a new version? #1628

Answered by xhero
fjorba asked this question in Q&A
Discussion options

You must be logged in to vote

Taking a version snapshot should be easy, as it should happen when you call .save
On the other hand, simulating the editor save... is not easy. Basically when you launch the editor the marc data gets rendered via partials to the editor blocks, and then the editor blocks are read via javascript and sent back to marc_editor_save. So to simulate that on the backed I imagine you would need something that can run javascript to serialise all the marc from the editor? In any case, the order of subfields should always be alphabetical at the end, and the ordering of the single tags is preserved unless you move it around. Let's say you have this as your input

=600 some_tag
=500 stuff1
=500 stuff2
=…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@fjorba
Comment options

Answer selected by fjorba
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants