[Bug 22245] New: MARC modification templates does not allow move or copy control fields

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 22245] New: MARC modification templates does not allow move or copy control fields

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22245

            Bug ID: 22245
           Summary: MARC modification templates does not allow move or
                    copy control fields
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: Tools
          Assignee: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]
  Target Milestone: ---

MARC modification templates does not allow an action with move, copy nor copy
and replace when both from and to fields are control fields.
This should be allowed.
Looks like there just some work to do on RegExp use since it calls
$field->subfields.

--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22245] MARC modification templates does not allow move or copy control fields

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22245

Fridolin SOMERS <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |11395


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11395
[Bug 11395] Batch modifications for records
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22245] MARC modification templates does not allow move or copy control fields

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22245

Fridolin SOMERS <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22245] MARC modification templates does not allow move or copy control fields

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22245

Koha Team Lyon 3 <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22245] MARC modification templates does not allow move or copy control fields

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22245

Josef Moravec <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22245] MARC modification templates does not allow move or copy control fields

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22245

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |Needs Signoff

--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22245] MARC modification templates does not allow move or copy control fields

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22245

--- Comment #1 from Jonathan Druart <[hidden email]> ---
Created attachment 85209
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85209&action=edit
Bug 22245: Allow copy/move from and to control fields

The JS conditions were wrong, we want to allow copy and move between
control fields.

Test plan:
Create a new MARC modification template action using control fields.
Confirm that you are allowed to copy/move a control field to another one

--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22245] MARC modification templates does not allow move or copy control fields

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22245

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]-c
                   |                            |ommunity.org
           Assignee|[hidden email]-commun |[hidden email]-c
                   |ity.org                     |ommunity.org

--- Comment #2 from Jonathan Druart <[hidden email]> ---
See also
  commit 1079f971e3bc659f3053d9608dbde0b856531111
  Bug 11395: Raise an alert if control field is used

    If a control field is used with a copy or move action, the interface
    should block the user in some cases:
    - If a control field is used with a regular field
    - The subfield should be empty

--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22245] MARC modification templates does not allow move or copy control fields

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22245

Fridolin SOMERS <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |In Discussion

--- Comment #3 from Fridolin SOMERS <[hidden email]> ---
1)
With this patch, if I set "from" with control field (ie 003) and "to" with a
regular field (ie 998$e) :

I get message :
MSG_MMT_SUBFIELDS_MATCH = _("Both subfield values should be filled or empty.");

I think this message is only for regular fields in "from" and "to", so you
don't move a entire field to a subfield for example.

2)
This does not allow copy/move of a control field in the subfield of a regular
field, ie 005 => 998$d.
This should be allowed ?
What is surely not allowed is : 005 => 998

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22245] MARC modification templates does not allow move or copy control fields

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22245

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|In Discussion               |Needs Signoff

--- Comment #4 from Jonathan Druart <[hidden email]> ---
(In reply to Fridolin SOMERS from comment #3)

> 1)
> With this patch, if I set "from" with control field (ie 003) and "to" with a
> regular field (ie 998$e) :
>
> I get message :
> MSG_MMT_SUBFIELDS_MATCH = _("Both subfield values should be filled or
> empty.");
>
> I think this message is only for regular fields in "from" and "to", so you
> don't move a entire field to a subfield for example.

I would not add complexity to the JS code, the message is correct even if it
could be more exact. You can provide a follow-up if you think it's really
needed, I personally think it's not that important.

> 2)
> This does not allow copy/move of a control field in the subfield of a
> regular field, ie 005 => 998$d.
> This should be allowed ?
> What is surely not allowed is : 005 => 998

Maybe, maybe not.
This limitation has been added by commit 1079f971e3bc "Raise an alert if
control field is used". Added on bug 11395 comment 36 without explanations. I
cannot remember why, maybe you can find it on the BibLibre bug tracker?
Anyway it's for another bug report.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22245] MARC modification templates does not allow move or copy control fields

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22245

Katrin Fischer <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #5 from Katrin Fischer <[hidden email]> ---
> > 2)
> > This does not allow copy/move of a control field in the subfield of a
> > regular field, ie 005 => 998$d.
> > This should be allowed ?

A very common use case would be 001 > 035$a + Adding a prefix in MARC21. So it
would be nice if that worked.

> > What is surely not allowed is : 005 => 998

I agree, in this case the 998 should have a subfield. Not sure the standard has
a say about this, but a lot of code I think assumed only <10 have no subfields.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22245] MARC modification templates does not allow move or copy control fields

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22245

--- Comment #6 from Fridolin SOMERS <[hidden email]> ---
Ah OK, actually control field can not be used with the subfield of a regular
field.

I see is not implemented in Koha::SimpleMARC :
https://gitlab.com/koha-community/Koha/blob/f355788b340b19912891fd41c3168bac9c951aff/Koha/SimpleMARC.pm#L130

So this patch is good.

Just a problem :
When using 2 control fields, looks like move or copy with RexExp does not work.
I think its from :
https://gitlab.com/koha-community/Koha/blob/f355788b340b19912891fd41c3168bac9c951aff/Koha/SimpleMARC.pm#L570

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22245] MARC modification templates does not allow move or copy control fields

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22245

Fridolin SOMERS <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://bugs.koha-community
                   |                            |.org/bugzilla3/show_bug.cgi
                   |                            |?id=22436

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22245] MARC modification templates does not allow move or copy control fields

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22245

--- Comment #7 from Fridolin SOMERS <[hidden email]> ---
22436(In reply to Katrin Fischer from comment #5)

> > > 2)
> > > This does not allow copy/move of a control field in the subfield of a
> > > regular field, ie 005 => 998$d.
> > > This should be allowed ?
>
> A very common use case would be 001 > 035$a + Adding a prefix in MARC21. So
> it would be nice if that worked.
>
> > > What is surely not allowed is : 005 => 998
>
> I agree, in this case the 998 should have a subfield. Not sure the standard
> has a say about this, but a lot of code I think assumed only <10 have no
> subfields.

I have opened Bug 22436 for that.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22245] MARC modification templates does not allow move or copy control fields

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22245

Michal Denar <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/