Bugzilla – Attachment 128164 Details for
Bug 9565
Deleting a record should alert or fail if there are current subscriptions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9565: (follow-up) Deleting a biblio should alert/fail if there are existent subscriptions
Bug-9565-follow-up-Deleting-a-biblio-should-alertf.patch (text/plain), 2.61 KB, created by
PTFS Europe Sandboxes
on 2021-12-02 13:52:44 UTC
(
hide
)
Description:
Bug 9565: (follow-up) Deleting a biblio should alert/fail if there are existent subscriptions
Filename:
MIME Type:
Creator:
PTFS Europe Sandboxes
Created:
2021-12-02 13:52:44 UTC
Size:
2.61 KB
patch
obsolete
>From 9b3e70f8a77d49efe432b3129b6785320ae5f8c7 Mon Sep 17 00:00:00 2001 >From: Marion Durand <marion.durand@biblibre.com> >Date: Thu, 21 Oct 2021 15:06:02 +0200 >Subject: [PATCH] Bug 9565: (follow-up) Deleting a biblio should alert/fail if > there are existent subscriptions > >Clicking on "Delete record" while there are existent subscriptions no >longer delete the record and the subscription. Instead an alert box >inform the user that he must delete all subscription before deleting the >record. > >To test: >1) Add a subscription to a biblio, or check a biblio which has one > attached already. >2) Remove all items if there are any. >3) Apply patch. >4) Confirm that the 'Delete record' item is disabled in the list. >5) Attempt to 'Delete record', you should recieve > an error message stating to delete all subscriptions before > deleting record. >6) Sign off. > >Sponsored by: Lunds Universitetsbibliotek > >Signed-off-by: Samu Heiskanen <samu.heiskanen@hypernova.fi> > >Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se> >--- > koha-tmpl/intranet-tmpl/prog/en/includes/catalog-strings.inc | 1 + > koha-tmpl/intranet-tmpl/prog/js/catalog.js | 2 ++ > 2 files changed, 3 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/catalog-strings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/catalog-strings.inc >index d74261d089..3ab04f9af1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/catalog-strings.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/catalog-strings.inc >@@ -10,6 +10,7 @@ > [% SET cancelled = Context.Scalar(orders, "filter_by_cancelled") %] > var countorders = [% current.count || 0 | html %]; > var countdeletedorders = [% cancelled.count || 0 | html %]; >+ var subscriptionscount = [% biblio.subscriptions.count || 0 | html %]; > var searchid = '[% searchid | html %]'; > > /* provide Z3950 search points */ >diff --git a/koha-tmpl/intranet-tmpl/prog/js/catalog.js b/koha-tmpl/intranet-tmpl/prog/js/catalog.js >index 76428397f1..2d63aecb81 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/catalog.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/catalog.js >@@ -44,6 +44,8 @@ function confirm_deletion(link) { > } > } else if ( holdcount > 0 ) { > is_confirmed = confirm( __("%s holds(s) for this record. Are you sure you want to delete this record?").format(holdcount)); >+ } else if (subscriptionscount > 0){ >+ is_confirmed = alert(__("%s subscription(s) are attached to this record. You must delete all subscription before deleting this record.").format(subscriptionscount)); > } else { > is_confirmed = confirm( __("Are you sure you want to delete this record?") ); > } >-- >2.20.1
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 9565
:
113589
|
113591
|
126821
|
126905
|
128051
|
128160
|
128163
|
128164
|
128165
|
128278
|
128279
|
128280
|
128281
|
128764
|
128832