Bugzilla – Attachment 194322 Details for
Bug 14962
Temp Shelving Location / On Display Module
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14962: (QA follow-up) Fix silent failures and dead code in DisplaysResource
49bb8f3.patch (text/plain), 2.77 KB, created by
Martin Renvoize (ashimema)
on 2026-03-02 10:25:40 UTC
(
hide
)
Description:
Bug 14962: (QA follow-up) Fix silent failures and dead code in DisplaysResource
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2026-03-02 10:25:40 UTC
Size:
2.77 KB
patch
obsolete
>From 49bb8f3177f9abe41e5f5ff121a380122903e0f9 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@openfifth.co.uk> >Date: Tue, 24 Feb 2026 13:23:57 +0000 >Subject: [PATCH] Bug 14962: (QA follow-up) Fix silent failures and dead code > in DisplaysResource > >Two issues in DisplaysResource.vue: > >1. The error handlers for create() and update() in onFormSave were empty, > so API failures (422, 500, etc.) produced no feedback to the user. > Use the already-injected setError to show an error message. > >2. An empty onBeforeMount(() => {}) lifecycle hook with its corresponding > import was left over from development. Remove the dead code. > >Sponsored-by: ByWater Solutions >Signed-of-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> >--- > .../components/Display/DisplaysResource.vue | 18 +++++++++++++----- > 1 file changed, 13 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Display/DisplaysResource.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Display/DisplaysResource.vue >index 245e3e3144c..03d984d2d32 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Display/DisplaysResource.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Display/DisplaysResource.vue >@@ -5,7 +5,7 @@ > ></BaseResource> > </template> > <script> >-import { inject, onBeforeMount } from "vue"; >+import { inject } from "vue"; > import BaseResource from "../BaseResource.vue"; > import { useBaseResource } from "../../composables/base-resource.js"; > import { storeToRefs } from "pinia"; >@@ -481,7 +481,12 @@ export default { > baseResource.setMessage($__("Display updated")); > baseResource.router.push({ name: "DisplaysList" }); > }, >- error => {} >+ error => { >+ setError( >+ $__("An error occurred while saving the display"), >+ true >+ ); >+ } > ); > } else { > baseResource.apiClient.create(display).then( >@@ -489,7 +494,12 @@ export default { > baseResource.setMessage($__("Display created")); > baseResource.router.push({ name: "DisplaysList" }); > }, >- error => {} >+ error => { >+ setError( >+ $__("An error occurred while saving the display"), >+ true >+ ); >+ } > ); > } > }; >@@ -510,8 +520,6 @@ export default { > } > }; > >- onBeforeMount(() => {}); >- > return { > ...baseResource, > tableOptions, >-- >2.53.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 14962
:
190216
|
190217
|
190218
|
190219
|
190220
|
190221
|
190222
|
190223
|
190224
|
190225
|
190226
|
190227
|
190228
|
190229
|
190230
|
190231
|
190232
|
190571
|
190572
|
193719
|
193720
|
193721
|
193722
|
193723
|
193724
|
193725
|
193726
|
193727
|
193728
|
193729
|
193730
|
193731
|
193732
|
193733
|
193734
|
193735
|
193736
|
193737
|
193738
|
193739
|
193740
|
193741
|
193742
|
193743
|
193744
|
193745
|
193746
|
193747
|
193748
|
193749
|
193750
|
193751
|
193752
|
193753
|
193754
|
193755
|
194285
|
194286
|
194287
|
194288
|
194289
|
194290
|
194291
|
194292
|
194293
|
194294
|
194295
|
194296
|
194297
|
194298
|
194299
|
194300
|
194301
|
194302
|
194303
|
194304
|
194305
|
194306
|
194307
|
194308
|
194309
|
194310
|
194311
|
194312
|
194313
|
194314
|
194315
|
194316
|
194317
|
194318
|
194320
|
194321
| 194322