marc_exporter should have an option to filter out existing 852s

Bug #1988472 reported by Rogan Hamby
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Confirmed
Wishlist
Unassigned

Bug Description

when using marc exporter with holdings existing 852s can create added noise at best and at worst create bad data. patch incoming.

Tags: pullrequest
Changed in evergreen:
status: New → Confirmed
Revision history for this message
Jason Stephenson (jstephenson) wrote :

We've had to implement a custom export that removes 852s and replaces them with those representing a certain library's holdings for a particular vendor product.

At one point, CWMARS started to add options to marc_export that could be used to remove certain fields and/or fields with matching subfields. It never got very far because it turned into a mini programming language for the command line and other priorities took precedence. See bug 1754455.

Revision history for this message
Rogan Hamby (rogan-hamby) wrote :
description: updated
tags: added: pullrequest
Revision history for this message
Galen Charlton (gmc) wrote :

To suggest a couple small alternatives:

- just unconditionally removing legacy 852s when the --items switch is in effect.
- adding a --remove-fields option that accepts a list of tags to remove (done, of course, before any 852s are added for items)

Thoughts?

Revision history for this message
Jason Stephenson (jstephenson) wrote :

There's a commit from Dan Peal from four years ago that basically does this with regular expressions:

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=commit;h=757309830b8182794b986ca30ab851d389403360

It's from bug 1754455 that I mentioned in my previous comment. I was testing it, but other things came up and I never got back to looking at it.

I misspoke about it becoming a mini-language. Just looking at the commit message and perusing the diff, I think it should work and be useful with a little clean up.

Revision history for this message
Jason Stephenson (jstephenson) wrote :

I pushed a cleaned up, rebased version of Dan Pearl's code if anyone wants to have a look:

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/collab/dyrcona/LP1754455_marc_export_regex

Revision history for this message
Jason Boyer (jboyer) wrote :

Since I've already posted my reply intended for this on bug 1754455 I'll mark this one a dupe.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.