Bug 28915 - MARC modification templates should allow specification of a position or range within a control field
Summary: MARC modification templates should allow specification of a position or range...
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-27 18:51 UTC by Andrew Fuerste-Henry
Modified: 2025-06-10 12:19 UTC (History)
18 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2021-08-27 18:51:36 UTC
When dealing with the MARC Leader, 008, and other fixed length control fields, it would be nice to be able to make the modification templates look at, match on, and alter only a specific position or range. 

For example, suppose I have several records in which I want to change the 008 position 33 (Literary form) from a 0 to a 1 (nonfiction to fiction).
Currently I could tell my modification template to update the 008 of every record I point it at where the character in position 33 is a 0 (using regex to match only that specific character). But then there's no way to change ONLY that character and preserve the rest of the field.
Comment 1 AspenCat Team 2022-07-06 21:34:57 UTC
This would be useful.
Comment 2 Noémie Labine 2023-09-20 13:28:15 UTC
+1
Comment 3 Marie-Luce Laflamme 2024-03-27 15:41:53 UTC
This feature would be a huge plus!
Comment 4 helm.consortium 2024-09-13 11:20:53 UTC
This could be great for dealing with publication dates in the 008.
Comment 5 Jason Robb 2024-12-03 16:26:38 UTC
Agree, it would be nice to be able to copy a 264$c or 260$c to the proper position of the 008 using MARC modification templates.
Comment 6 Kati Sillgren 2024-12-04 06:28:36 UTC
This would be very useful.
Comment 7 Jeanne Mauriello 2025-06-09 15:36:14 UTC
I would also like to be able to do this. For example, we have a list of imported VOX books that are coded as a book in the Leader. We catalog them as audiobooks. Rather than editing each one, since there are lot, I wanted to be able use a marc modification template to edit the records.
Comment 8 Andrew Fuerste-Henry 2025-06-10 12:18:09 UTC
In theory, one should be able to use a regex substitution with capturing groups to specify a position within the control field and change just that one character -- I think I filed this original bug before regex groups were working in biblio modification. However, it looks like Bug 39909 is currently preventing that.
Comment 9 Andrew Fuerste-Henry 2025-06-10 12:19:30 UTC
(In reply to Andrew Fuerste-Henry from comment #8)
> In theory, one should be able to use a regex substitution with capturing
> groups to specify a position within the control field and change just that
> one character -- I think I filed this original bug before regex groups were
> working in biblio modification. However, it looks like Bug 39909 is
> currently preventing that.

I should clarify, I think a user interface that would allow one to just tell Koha a specific position to look at would still be nice to have, even if we get the regex working properly.