Bugzilla – Attachment 177724 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.96 KB, created by
Magnus Enger
on 2025-02-11 08:25:44 UTC
(
hide
)
Description:
Bug 32949: Fix wrong input id
Filename:
MIME Type:
Creator:
Magnus Enger
Created:
2025-02-11 08:25:44 UTC
Size:
1.96 KB
patch
obsolete
>From b2dd862d97d4375d5c3a8e83bb81462561453db2 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. > >Signed-off-by: Magnus Enger <magnus@libriotech.no> >Followed test plan, works as advertised. >--- > 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 3f85d4b819..576bf5f90a 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.34.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