Bugzilla – Attachment 102702 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 serial missing list doubles
Bug-24842-regexp-issue-create-serial-missing-list-.patch (text/plain), 2.59 KB, created by
Claudie Trégouët
on 2020-04-10 12:05:03 UTC
(
hide
)
Description:
Bug 24842 regexp issue create serial missing list doubles
Filename:
MIME Type:
Creator:
Claudie Trégouët
Created:
2020-04-10 12:05:03 UTC
Size:
2.59 KB
patch
obsolete
>From 15dce4a86501a363c30ac5607012d018b60b4bdd Mon Sep 17 00:00:00 2001 >From: Olivier Crouzet <kohateam@univ-lyon3.fr> >Date: Thu, 12 Mar 2020 14:29:03 +0100 >Subject: [PATCH] Bug 24842 regexp issue create serial missing list doubles >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Signed-off-by: Claudie Trégouët <claudie.tregouet@biblibre.com> >--- > C4/Serials.pm | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > >diff --git a/C4/Serials.pm b/C4/Serials.pm >index 1841397dc4..05680bee3d 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); >@@ -1750,8 +1750,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/(^|;)\s*\Q$serialseq\E(?=;|$)//g; >+ $data->{'recievedlist'} =~ s/(^|;)\s*\Q$serialseq\E(?=;|$)//g; > my $strsth = "UPDATE subscriptionhistory SET " . join( ",", map { join( "=", $_, $dbh->quote( $data->{$_} ) ) } keys %$data ) . " WHERE subscriptionid=?"; > $sth = $dbh->prepare($strsth); > $sth->execute( $dataissue->{'subscriptionid'} ); >-- >2.11.0
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