Bugzilla – Attachment 152414 Details for
Bug 33885
Get HTTP 500 when retrieving orders created by a non-existent (deleted) user
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33885: Prevent JS crash if creator does no longer exist
Bug-33885-Prevent-JS-crash-if-creator-does-no-long.patch (text/plain), 1.87 KB, created by
Tomás Cohen Arazi (tcohen)
on 2023-06-16 13:18:58 UTC
(
hide
)
Description:
Bug 33885: Prevent JS crash if creator does no longer exist
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2023-06-16 13:18:58 UTC
Size:
1.87 KB
patch
obsolete
>From 796163c331b1a65df3202357884cf32339868229 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 7 Jun 2023 11:07:36 +0200 >Subject: [PATCH] Bug 33885: Prevent JS crash if creator does no longer exist > >JS error in the console was > Uncaught TypeError: row.creator is null > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > .../intranet-tmpl/prog/en/modules/acqui/orderreceive.tt | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >index 4dca002ae45..749e68dc703 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >@@ -1156,7 +1156,11 @@ > } > $("#bookfund").select2({ width: '50%' }); > $("#current-fund").html(FUNC_CUR.format(row.fund.budget.budget_period_description, row.fund.name)); >- $("#creator").html([row.creator.surname, row.creator.firstname].filter(function(name){return name}).join(', ')+" ("+row.creator.patron_id+')') >+ if( row.creator ) { >+ $("#creator").html([row.creator.surname, row.creator.firstname].filter(function(name){return name}).join(', ')+" ("+row.creator.patron_id+')') >+ } else { >+ $("#creator").html(__("Account has been deleted")); >+ } > $("#quantity_to_receive").val(row.quantity).prop('readonly', !row.subscription_id); > $("#quantity").val( effective_create_items == 'cataloguing' ? row.quantity_received || 1 : row.quantity_received ) > .prop('readonly', !row.subscription_id && effective_create_items == 'receiving') >-- >2.30.2
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 33885
:
152080
|
152081
|
152137
|
152138
|
152413
| 152414