-
When Marc records are edited in Muscat via web using the Marc editor, and saved back, in a way they are deconstructed and reconstructed using the values in the config files, for example for indicators. The order of the subfields is also redone, and it may not be the same than the record before being edited. When importing records, the importing process keeps the input values, for example for indicators. As part of our import and stabilization procedure, we'd like to reprocess them, in this case, publications, as if they had been edited, so the first manual edit already in Muscat effectively stores just those manual changes. I have looked at the housekeeping directory for examples, not been able to find the solution. A simplified version of what I'm trying to do is: publications = Publication.all
publications.each do |publication|
publication.marc_editor_save # What should I put here?
publication.save
end I'm also interested that this update is stored as a new version. Your help would be much appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Taking a version snapshot should be easy, as it should happen when you call
When you save, it will be reordered but the sequence of the 500's maintained:
What will also happen is that if you have non-configured subtags, they will not be preserved. |
Beta Was this translation helpful? Give feedback.
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