Bugzilla – Attachment 170226 Details for
Bug 36758
We should notify an assignee when they are assigned a ticket
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36758: (follow-up) Fix unit tests
Bug-36758-follow-up-Fix-unit-tests.patch (text/plain), 1.68 KB, created by
Martin Renvoize (ashimema)
on 2024-08-12 09:17:32 UTC
(
hide
)
Description:
Bug 36758: (follow-up) Fix unit tests
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-08-12 09:17:32 UTC
Size:
1.68 KB
patch
obsolete
>From 9f1cd9bbab84216a882f3e7c7f6e45cead83809c Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 12 Aug 2024 10:15:20 +0100 >Subject: [PATCH] Bug 36758: (follow-up) Fix unit tests > >We do two things here.. > >* We're making the improvement to C4::Letters that sets librarian to a > patron object more resilient by testing for the userenv first. >* We correct the logic in Koha::Ticket such that we always store changes > when there's a ticket update > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Letters.pm | 3 ++- > Koha/Ticket.pm | 3 ++- > 2 files changed, 4 insertions(+), 2 deletions(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index 497b97dab99..3f2fc95a4b0 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -626,7 +626,8 @@ sub GetPreparedLetter { > return; > my $want_librarian = $params{want_librarian}; > if ($want_librarian) { >- $objects->{librarian} = Koha::Patrons->find( C4::Context->userenv->{number} ); >+ my $userenv = C4::Context->userenv; >+ $objects->{librarian} = Koha::Patrons->find( C4::Context->userenv->{number} ) if ($userenv); > } > > # Best guess at language 'default' notice is written for include handling >diff --git a/Koha/Ticket.pm b/Koha/Ticket.pm >index eb2580032e1..18f9c672a39 100644 >--- a/Koha/Ticket.pm >+++ b/Koha/Ticket.pm >@@ -176,7 +176,8 @@ sub store { > } > } else { > my %updated_columns = $self->_result->get_dirty_columns; >- return $self->SUPER::store unless %updated_columns; >+ $self->SUPER::store; >+ $self->discard_changes; > > $assignee = ( exists $updated_columns{assignee_id} ) ? $self->assignee : undef; > } >-- >2.46.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 36758
:
166316
|
166317
|
166318
|
166319
|
166390
|
166391
|
166392
|
166393
|
169238
|
169239
|
169240
|
169241
| 170226