Bugzilla – Attachment 100462 Details for
Bug 24842
Automatic serials missing list feeding does not work when the numbering sequence includes regexp specific characters
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24842 Regexp issue create doubles in the serial missing list
0001-Bug-24842-regexp-issue-create-serial-missing-list-do.patch (text/plain), 2.41 KB, created by
Koha Team University Lyon 3
on 2020-03-10 14:33:57 UTC
(
hide
)
Description:
Bug 24842 Regexp issue create doubles in the serial missing list
Filename:
MIME Type:
Creator:
Koha Team University Lyon 3
Created:
2020-03-10 14:33:57 UTC
Size:
2.41 KB
patch
obsolete
>From c41553d09cedaa75029d8b91978ec1fe1f9f3a50 Mon Sep 17 00:00:00 2001 >From: Olivier Crouzet <kohateam@univ-lyon3.fr> >Date: Tue, 10 Mar 2020 15:04:51 +0100 >Subject: [PATCH] Bug 24842 regexp issue create serial missing list doubles > >--- > C4/Serials.pm | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > >diff --git a/C4/Serials.pm b/C4/Serials.pm >index 9d34b14..17b915a 100644 >--- a/C4/Serials.pm >+++ b/C4/Serials.pm >@@ -1119,18 +1119,18 @@ sub ModSerialStatus { > > if ( $status == ARRIVED || ($oldstatus == ARRIVED && $status != ARRIVED) ) { > $recievedlist .= "; $serialseq" >- if ($recievedlist !~ /(^|;)\s*$serialseq(?=;|$)/); >+ if ($recievedlist !~ /(^|;)\s*\Q$serialseq\E(?=;|$)/); > } > > # in case serial has been previously marked as missing > if (grep /$status/, (EXPECTED, ARRIVED, LATE, CLAIMED)) { >- $missinglist=~ s/(^|;)\s*$serialseq(?=;|$)//g; >+ $missinglist=~ s/(^|;)\s*\Q$serialseq\E(?=;|$)//g; > } > > $missinglist .= "; $serialseq" >- if ( ( grep { $_ == $status } ( MISSING_STATUSES ) ) && ( $missinglist !~/(^|;)\s*$serialseq(?=;|$)/ ) ); >+ if ( ( grep { $_ == $status } ( MISSING_STATUSES ) ) && ( $missinglist !~/(^|;)\s*\Q$serialseq\E(?=;|$)/ ) ); > $missinglist .= "; not issued $serialseq" >- if ( $status == NOT_ISSUED && $missinglist !~ /(^|;)\s*$serialseq(?=;|$)/ ); >+ if ( $status == NOT_ISSUED && $missinglist !~ /(^|;)\s*\Q$serialseq\E(?=;|$)/ ); > > $query = "UPDATE subscriptionhistory SET recievedlist=?, missinglist=? WHERE subscriptionid=?"; > $sth = $dbh->prepare($query); >@@ -1778,8 +1778,8 @@ sub DelIssue { > $sth->execute( $dataissue->{'subscriptionid'} ); > my $data = $sth->fetchrow_hashref; > my $serialseq = $dataissue->{'serialseq'}; >- $data->{'missinglist'} =~ s/\b$serialseq\b//; >- $data->{'recievedlist'} =~ s/\b$serialseq\b//; >+ $data->{'missinglist'} =~ s/\b\Q$serialseq\E\b//; >+ $data->{'recievedlist'} =~ s/\b\Q$serialseq\E\b//; > my $strsth = "UPDATE subscriptionhistory SET " . join( ",", map { join( "=", $_, $dbh->quote( $data->{$_} ) ) } keys %$data ) . " WHERE subscriptionid=?"; > $sth = $dbh->prepare($strsth); > $sth->execute( $dataissue->{'subscriptionid'} ); >-- >2.1.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24842
:
100462
|
100635
|
102702