Bugzilla – Attachment 147961 Details for
Bug 33063
Duplicated reports should maintain subgroup of original
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33063: Make sure correct subgroup is pre-selected when duplicating reports
Bug-33063-Make-sure-correct-subgroup-is-pre-select.patch (text/plain), 2.43 KB, created by
Lucas Gass (lukeg)
on 2023-03-08 15:02:44 UTC
(
hide
)
Description:
Bug 33063: Make sure correct subgroup is pre-selected when duplicating reports
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2023-03-08 15:02:44 UTC
Size:
2.43 KB
patch
obsolete
>From 64659cde5100be2300c69ff690fe893e8f03359d Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Mon, 27 Feb 2023 23:45:12 +0000 >Subject: [PATCH] Bug 33063: Make sure correct subgroup is pre-selected when > duplicating reports > >When the 'Duplicate' option for reports was used, the all options >would be copied correctly to the new report, but the report sub group. > >In this case the templates were created correctly, but the JavaScript >to create the correct pull downs for each group, overwrote the >the selection. > >To test: >* Create a some reports with different groups and subgroups and without >* 'Duplicate' your reports and verify that the sub group will always stay empty >* Apply patch >* Verify the correct sub group is now always selected >* Edit/Add some reports to make sure the group/subgroup controls still > work as expected > >Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> > >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >--- > .../prog/en/modules/reports/guided_reports_start.tt | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >index 0733fca6f4..ae75793990 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >@@ -1729,6 +1729,7 @@ > > function load_group_subgroups () { > var group = $("#group_select").val(); >+ var subgroup = $("#subgroup_select").val(); > var sg = $("#subgroup"); > $(sg).find('option[value!=""]').each(function() { > $(this).remove(); >@@ -1737,7 +1738,11 @@ > if (group) { > var select = $(sg).find('select')[0]; > $.each( group_subgroups[group], function(index, value) { >- $('<option value="' + value[0] + '">' + value[1] + '</option>').appendTo(select); >+ if ( value[0] == subgroup ) { >+ $('<option selected="selected" value="' + value[0] + '">' + value[1] + '</option>').appendTo(select); >+ } else { >+ $('<option value="' + value[0] + '">' + value[1] + '</option>').appendTo(select); >+ } > } ); > $("#subgroup, #subgroup *").show(); > } >-- >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 33063
:
147475
|
147819
| 147961