Bugzilla – Attachment 177925 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), 2.04 KB, created by
Nick Clemens (kidclamp)
on 2025-02-12 14:38:52 UTC
(
hide
)
Description:
Bug 32949: Fix wrong input id
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2025-02-12 14:38:52 UTC
Size:
2.04 KB
patch
obsolete
>From c3d063b81b004e42f327c2de93bf43a0b73e7464 Mon Sep 17 00:00:00 2001 >From: Petro Vashchuk <stalkernoid@gmail.com> >Date: Wed, 12 Feb 2025 14:36:47 +0000 >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. >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > 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 9f58ef41c63..7c36fb4d1d0 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 >@@ -1520,7 +1520,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.39.5
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