Bugzilla – Attachment 177678 Details for
Bug 32949
Smart-rules prefills junk date on page load
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32949: Fix wrong input id
Bug-32949-Fix-wrong-input-id.patch (text/plain), 1.87 KB, created by
Peter Vashchuk
on 2025-02-10 12:54:20 UTC
(
hide
)
Description:
Bug 32949: Fix wrong input id
Filename:
MIME Type:
Creator:
Peter Vashchuk
Created:
2025-02-10 12:54:20 UTC
Size:
1.87 KB
patch
obsolete
>From 2376f6ccff78c26cb79f342adbec5faa1b02b0c8 Mon Sep 17 00:00:00 2001 >From: Petro Vashchuk <stalkernoid@gmail.com> >Date: Mon, 10 Feb 2025 14:52:57 +0200 >Subject: [PATCH] Bug 32949: Fix wrong input id > >The input id was wrong, so instead "else" was handling the flatpickr data >as plain text, which prefilled junk data and therefore resetting value of >"Hard due date" field to "None defined". > >To reproduce: >1. Head over to the smart rules admin page and create/use existing rule >for certain item type/category. >2. Set "hard due date" that rule to a certain date and save. >3. Edit that same rule again, but this time save it without any >changes. Do not click or interact with flatpickr field. >Date for hard due date will get lost and will be set as "None defined". >4. Apply the patch. >5. Repeat steps 2 and 3. Ensure that the data loss is not happening >anymore. >--- > koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >index 3f85d4b819b..576bf5f90af 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >@@ -1555,7 +1555,7 @@ > // specific processing for the Note column > var note = $(this).find("a[id='viewnote']").data("content"); > $(current_column).find("input[type='text']").val(note); >- } else if ( current_input_id === "hardduedatecompare" ) { >+ } else if ( current_input_id === "hardduedate" ) { > // specific processing for Hard due date > $(current_column).find("select").val(itm_code); > var hardduedate = $(this).data('duedate'); >-- >2.48.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 32949
:
146584
|
146587
|
177678
|
177724
|
177925