[Bug 20923] New: Merging backend status graph into main status graph incorrect use of grep

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

[Bug 20923] New: Merging backend status graph into main status graph incorrect use of grep

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

            Bug ID: 20923
           Summary: Merging backend status graph into main status graph
                    incorrect use of grep
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: ILL
          Assignee: [hidden email]
          Reporter: [hidden email]

When the Illrequest object is being constructed, it consults the status graphs
for enabled backends. These status graphs are then merged into the main graph
in order to provide the full workflow for a request.

As part of this process, the "next_actions" property is updated to reflect any
new statuses. During this, a check is performed to determine if the status
graph knows about the next status being declared by a backend status graph:

if ( grep $prev_action, @core_status_ids ) {

This is incorrect. According to http://perldoc.perl.org/functions/grep.html,
the first parameter should be a block or expression, here we are passing a
string. This malfunctions in so much as passing "REQ" with match twice in the
following array [ "REQ", "REQREV" ], this is not what we would expect.

The fix is to substitute the following line:

if ( grep /^$prev_action$/, @core_status_ids ) {

--
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 20923] Merging backend status graph into main status graph incorrect use of grep

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

Andrew Isherwood <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|[hidden email]-commun |andrew.isherwood@ptfs-europ
                   |ity.org                     |e.com
             Status|NEW                         |ASSIGNED

--
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 20923] Merging backend status graph into main status graph incorrect use of grep

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

Andrew Isherwood <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|enhancement                 |normal

--
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 20923] Merging backend status graph into main status graph incorrect use of grep

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

--- Comment #1 from Andrew Isherwood <[hidden email]> ---
Created attachment 76020
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76020&action=edit
Bug 20923: Fix usage of grep

This patch implements the fix described in the bug description. It is
impossible to test without the work that will be added to bug 20917.
Therefore a dependency will be added for that bug and a test plan will
be added here when that work is done.

--
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 20923] Merging backend status graph into main status graph incorrect use of grep

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

Andrew Isherwood <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |20917


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20917
[Bug 20917] Improve email functionality relating to ILL requests
--
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 20923] Merging backend status graph into main status graph incorrect use of grep

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

Tomás Cohen Arazi <[hidden email]> changed:

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

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