[Bug 19069] New: "Doesn't match" option fails in MARC Modification Templates

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

[Bug 19069] New: "Doesn't match" option fails in MARC Modification Templates

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

            Bug ID: 19069
           Summary: "Doesn't match" option fails in MARC Modification
                    Templates
 Change sponsored?: ---
           Product: Koha
           Version: 17.05
          Hardware: Macintosh
                OS: Mac OS
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: MARC Bibliographic record staging/import
          Assignee: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]

Created attachment 65781
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65781&action=edit
A single MARC record to use in order to test what I'm describing.

When adding a new action in a MARCH modification template, the "doesn't match"
option fails in places where there are multiple fields.

I was importing MARC records with item holdings in 999 fields. Most of the
records had multiple 999s. In most, there was one 999 field that had an $l
field with the value "NASH".

I set up the template to first get rid of all 999 fields where the l doeesn't
match NASH. It didn't work.

If I reverse the action, and write multiple actions that match on every other
999$1 field value, it works. I've tested several different ways, and the only
conclusion I can come to is that the "doesn't match" option is failing.

I've attached a sample MARC record.

--
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 19069] "Doesn't match" option fails in MARC Modification Templates

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

[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 19069] "Doesn't match" option fails in MARC Modification Templates

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

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |14568

--
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 19069] "Doesn't match" option fails in MARC Modification Templates

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

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|14568                       |

--
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 19069] "Doesn't match" option fails in MARC Modification Templates

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

Jonathan Druart <[hidden email]> changed:

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

--
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 19069] "Doesn't match" option fails in MARC Modification Templates

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

--- Comment #1 from Jonathan Druart <[hidden email]> ---
Created attachment 67530
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67530&action=edit
Bug 19069: Fix 'does not match' behaviour in MARC modification template

The "does not match" condition does not behave as expected.
We want it to process the action if the subfield exists and that the
value does not match a given pattern.

Test plan:
Be creative and write different template actions using the "does not
match" condition.
Using the "Batch record modification" and the "Show MARC" popup, confirm
that the processed record is the one you are expecting.

--
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 19069] "Doesn't match" option fails in MARC Modification Templates

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

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]-c
                   |                            |ommunity.org
            Version|17.05                       |master
           Hardware|Macintosh                   |All
                 OS|Mac OS                      |All
           Assignee|[hidden email]-commun |[hidden email]-c
                   |ity.org                     |ommunity.org

--- Comment #2 from Jonathan Druart <[hidden email]> ---
I first glance I would say the the "does not exist" condition is buggy as well.

--
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 19069] "Doesn't match" option fails in MARC Modification Templates

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

Jon Knight <[hidden email]> changed:

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

--- Comment #3 from Jon Knight <[hidden email]> ---
Is there a reason for having "does not match" and "does not exist" considering
there is the choice of "if" or "unless"?  In other words isn't:

"Delete field 999 unless 999$l matches NASH"

equivalent to

"Delete field 999 if 999$l does not match NASH"

?

--
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 19069] "Doesn't match" option fails in MARC Modification Templates

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

Jon Knight <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #67530|0                           |1
        is obsolete|                            |

--- Comment #4 from Jon Knight <[hidden email]> ---
Created attachment 67972
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67972&action=edit
Bug 19069: Fix 'does not match' behaviour in MARC modification template

The "does not match" condition does not behave as expected.
We want it to process the action if the subfield exists and that the
value does not match a given pattern.

Test plan:
Be creative and write different template actions using the "does not
match" condition.
Using the "Batch record modification" and the "Show MARC" popup, confirm
that the processed record is the one you are expecting.

Signed-off-by: Jon Knight <[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 19069] "Doesn't match" option fails in MARC Modification Templates

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

Jon Knight <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #67972|0                           |1
        is obsolete|                            |

--- Comment #5 from Jon Knight <[hidden email]> ---
Created attachment 67973
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67973&action=edit
Bug 19069: Fix 'does not match' behaviour in MARC modification template

The "does not match" condition does not behave as expected.
We want it to process the action if the subfield exists and that the
value does not match a given pattern.

Test plan:
Be creative and write different template actions using the "does not
match" condition.
Using the "Batch record modification" and the "Show MARC" popup, confirm
that the processed record is the one you are expecting.

Signed-off-by: Jon Knight <[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 19069] "Doesn't match" option fails in MARC Modification Templates

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

Jon Knight <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |Signed Off

--
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 19069] "Doesn't match" option fails in MARC Modification Templates

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

Marcel de Rooy <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]
             Status|Signed Off                  |Failed QA

--- Comment #6 from Marcel de Rooy <[hidden email]> ---
FAIL   Koha/MoreUtils.pm
   FAIL   critic
                Subroutine prototypes used at line 6, column 1. See page 194 of
PBP.
   OK     forbidden patterns
   OK     git manipulation
   OK     pod
   FAIL   pod coverage
                POD coverage was greater before, try perl
-MPod::Coverage=PackageName -e666
   SKIP   spelling
   OK     valid

--
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 19069] "Doesn't match" option fails in MARC Modification Templates

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

--- Comment #7 from Jonathan Druart <[hidden email]> ---
(In reply to Jon Knight from comment #3)

> Is there a reason for having "does not match" and "does not exist"
> considering there is the choice of "if" or "unless"?  In other words isn't:
>
> "Delete field 999 unless 999$l matches NASH"
>
> equivalent to
>
> "Delete field 999 if 999$l does not match NASH"
>
> ?

Yes, that sounds definitely valid.
Marcel, what do you think?

(In reply to Marcel de Rooy from comment #6)
> FAIL   Koha/MoreUtils.pm

The thing is that this subroutine is a copy/paste of the List::MoreUtils
subroutine, but in a newer version. I do not think we should modify it, even
for trivial changes.

--
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 19069] "Doesn't match" option fails in MARC Modification Templates

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

--- Comment #8 from Marcel de Rooy <[hidden email]> ---
(In reply to Jon Knight from comment #3)

> Is there a reason for having "does not match" and "does not exist"
> considering there is the choice of "if" or "unless"?  In other words isn't:
>
> "Delete field 999 unless 999$l matches NASH"
>
> equivalent to
>
> "Delete field 999 if 999$l does not match NASH"
>
> ?

Your question and your example do not match.
You are not comparing match and exist here.
Testing for 245a does [not] exist is different from 245a does [not] match
'test'.

--
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 19069] "Doesn't match" option fails in MARC Modification Templates

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

Marcel de Rooy <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Failed QA                   |Signed Off

--- Comment #9 from Marcel de Rooy <[hidden email]> ---
(In reply to Jonathan Druart from comment #7)
> (In reply to Marcel de Rooy from comment #6)
> > FAIL   Koha/MoreUtils.pm
>
> The thing is that this subroutine is a copy/paste of the List::MoreUtils
> subroutine, but in a newer version. I do not think we should modify it, even
> for trivial changes.

Good enough

--
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 19069] "Doesn't match" option fails in MARC Modification Templates

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

--- Comment #10 from Jon Knight <[hidden email]> ---
(In reply to Marcel de Rooy from comment #8)

> (In reply to Jon Knight from comment #3)
> > Is there a reason for having "does not match" and "does not exist"
> > considering there is the choice of "if" or "unless"?  In other words isn't:
> >
> > "Delete field 999 unless 999$l matches NASH"
> >
> > equivalent to
> >
> > "Delete field 999 if 999$l does not match NASH"
> >
> > ?
>
> Your question and your example do not match.
> You are not comparing match and exist here.
> Testing for 245a does [not] exist is different from 245a does [not] match
> 'test'.

The example I used was "match"/"does not match", but the same holds true if we
use "exists"/"does not exist" too:

"Delete field 999 unless 999$l exists"

equivalent to

"Delete field 999 if 999$l does not exist"

--
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 19069] "Doesn't match" option fails in MARC Modification Templates

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

--- Comment #11 from Marcel de Rooy <[hidden email]> ---
(In reply to Jon Knight from comment #10)
> The example I used was "match"/"does not match", but the same holds true if
> we use "exists"/"does not exist" too:
>
> "Delete field 999 unless 999$l exists"
>  
> equivalent to
>
> "Delete field 999 if 999$l does not exist"

OK. That is of course true. Misunderstood.

--
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 19069] "Doesn't match" option fails in MARC Modification Templates

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

Kyle M Hall <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Signed Off                  |Passed QA

--
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 19069] "Doesn't match" option fails in MARC Modification Templates

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

Kyle M Hall <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #67973|0                           |1
        is obsolete|                            |

--- Comment #12 from Kyle M Hall <[hidden email]> ---
Created attachment 68693
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68693&action=edit
Bug 19069: Fix 'does not match' behaviour in MARC modification template

The "does not match" condition does not behave as expected.
We want it to process the action if the subfield exists and that the
value does not match a given pattern.

Test plan:
Be creative and write different template actions using the "does not
match" condition.
Using the "Batch record modification" and the "Show MARC" popup, confirm
that the processed record is the one you are expecting.

Signed-off-by: Jon Knight <[hidden email]>

Signed-off-by: Kyle M Hall <[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 19069] "Doesn't match" option fails in MARC Modification Templates

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

Kyle M Hall <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         QA Contact|[hidden email]-communit |[hidden email]
                   |y.org                       |
                 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 19069] "Doesn't match" option fails in MARC Modification Templates

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

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Passed QA                   |Pushed to Master

--- Comment #13 from Jonathan Druart <[hidden email]> ---
Pushed to master for 17.11, thanks to everybody involved!

--
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 19069] "Doesn't match" option fails in MARC Modification Templates

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

--- Comment #14 from Jonathan Druart <[hidden email]> ---
Created attachment 68781
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68781&action=edit
Bug 19069: (follow-up) Remove perlcritic error

Subroutine prototypes used at line 6, column 1.  See page 194 of PBP.
(Severity: 5)

--
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 19069] "Doesn't match" option fails in MARC Modification Templates

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

--- Comment #15 from Jonathan Druart <[hidden email]> ---
(In reply to Jonathan Druart from comment #14)
> Created attachment 68781 [details] [review]
> Bug 19069: (follow-up) Remove perlcritic error
>
> Subroutine prototypes used at line 6, column 1.  See page 194 of PBP.
> (Severity: 5)

Pushed to master

--
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/