Bugzilla – Attachment 151812 Details for
Bug 33864
Problems in order receive modal
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33864: Set default date in all acqcreateitem scenarios
Bug-33864-Set-default-date-in-all-acqcreateitem-sc.patch (text/plain), 2.52 KB, created by
Katrin Fischer
on 2023-05-30 16:27:00 UTC
(
hide
)
Description:
Bug 33864: Set default date in all acqcreateitem scenarios
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-05-30 16:27:00 UTC
Size:
2.52 KB
patch
obsolete
>From b135d81c0816116031841d37af05e42d8193f04f Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 30 May 2023 10:26:55 -0300 >Subject: [PATCH] Bug 33864: Set default date in all acqcreateitem scenarios > >On b0aab2aeef9a025d3907d0b723b5ea71eaf94542 the flatpickr default to >'today' was restored, but only for acqcreateitem='ordering'. This patch >moves the initialization to a different stop for broader reach. > >To test: >1. Have 3 baskets on with each setting: > - create_item = 'cateloguing' > - create_item = 'ordering' > - create_item = 'receiving' >2. Close those baskets >3. Go to 'Receive shipments' >4. Choose things from the 3 baskets and then 'Receive selected' >5. Navigate through the different orders >=> FAIL: Only the one that has items created on ordering has the date >filled by default >6. Apply this patch >7. Reload the page >8. Repeat 5 >=> SUCCESS: Dates are pre-filled! >9. Sign off :-D > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> > >https://bugs.koha-community.org/show_bug.cgi?id=33846 >--- > .../intranet-tmpl/prog/en/modules/acqui/orderreceive.tt | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >index 9f006ad862..6c78dd45e5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >@@ -475,9 +475,6 @@ > tr.append('<td>'+display_string( 'item_type_id', item._strings, item.item_type_id )+'</td>'); > tr.append('<td>'+display_string( 'materials_notes', item._strings, item.materials_notes )+'</td>'); > tr.append('<td>'+(item.public_notes||'')+'</td>'); >- >- const fp = document.querySelector("#datereceived")._flatpickr; >- fp.setDate(new Date()); > }; > > var items_columns = [null, null, 'external_id', 'home_library_id', >@@ -1138,7 +1135,10 @@ > } > > var effective_create_items = row.basket.create_items || AcqCreateItem; >- $("#datereceived").val(row.date_received||$date(new Date().toISOString())); >+ >+ // set today if no date_received in row >+ document.querySelector("#datereceived")._flatpickr.setDate(row.date_received||new Date()); >+ > // restore the full tree > $("#bookfund").html($funds_tree); > $("#selected_bookfund") >-- >2.30.2
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 33864
:
151799
|
151803
|
151811
|
151812
|
151813
|
151816
|
151821
|
151824
|
151852
|
151853
|
151854
|
151855
|
151856
|
151857
|
151858
|
151859