Bugzilla – Attachment 167545 Details for
Bug 36925
ERM eUsage reports : data table filter does not work
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36925: Remove filtering from usage reports
Bug-36925-Remove-filtering-from-usage-reports.patch (text/plain), 9.86 KB, created by
Matt Blenkinsop
on 2024-06-06 13:26:12 UTC
(
hide
)
Description:
Bug 36925: Remove filtering from usage reports
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2024-06-06 13:26:12 UTC
Size:
9.86 KB
patch
obsolete
>From 06db9246cbc5ff988b3e4e8347effe4867f9c3d8 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Thu, 6 Jun 2024 13:20:20 +0000 >Subject: [PATCH] Bug 36925: Remove filtering from usage reports > >The query behind a usage report is too complex for the datatables filtering options and so should be removed until we can add some datatables utility methods to assist with the filtering > >Test plan: >1) Navigate to E-resource management > eUsage > Data providers >2) Create a provider >3) Click into the provider and navigate to the Manual upload tab >4) Upload the file attached >5) Navigate to the Reports section in the left hand menu >6) Run a report that returns some data from the harvested file (report type is TR_J1) >7) Try to filter the table using the filter inputs, it will fail >8) Apply patch >9) Run yarn js:build to rebuild the Javascript >10) Hard refresh the browser >11) The filter options should not not be in the table >--- > .../ERM/UsageStatisticsReportsViewer.vue | 50 ++++++++++--------- > .../prog/js/vue/stores/usage-reports.js | 32 ++++++------ > 2 files changed, 43 insertions(+), 39 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsReportsViewer.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsReportsViewer.vue >index aefc745d70..d8123120d6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsReportsViewer.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsReportsViewer.vue >@@ -94,7 +94,10 @@ export default { > this.params, > this.data_type > ), >- options: { embed: this.embed }, >+ options: { >+ embed: this.embed, >+ dom: '<"top pager"<"table_entries"ilp>>tr<"bottom pager"ip>', >+ }, > url: () => this.tableURL(this.year, this.params), > table_settings: this.report_type.includes("monthly") > ? this.monthly_usage_table_settings >@@ -130,8 +133,8 @@ export default { > data_type.charAt(0).toUpperCase() + data_type.slice(1) > ), > data: data_type, >- searchable: true, >- orderable: true, >+ searchable: false, >+ orderable: false, > }) > > // Add metric type to each row >@@ -141,8 +144,8 @@ export default { > column_set.push({ > title: __("YOP"), > data: "yop", >- searchable: true, >- orderable: true, >+ searchable: false, >+ orderable: false, > }) > } > // Add access type if it is required >@@ -150,17 +153,18 @@ export default { > column_set.push({ > title: __("Access type"), > data: "access_type", >- searchable: true, >- orderable: true, >+ searchable: false, >+ orderable: false, > }) > } > column_set.push({ > title: __("Metric"), >+ data: "metric_type", > render: function (data, type, row, meta) { > return row.metric_type > }, >- searchable: true, >- orderable: true, >+ searchable: false, >+ orderable: false, > }) > } > >@@ -168,14 +172,14 @@ export default { > column_set.unshift({ > title: __("Data provider"), > data: "name", >- searchable: true, >- orderable: true, >+ searchable: false, >+ orderable: false, > }) > column_set.push({ > title: __("Period total"), > data: "provider_rollup_total", >- searchable: true, >- orderable: true, >+ searchable: false, >+ orderable: false, > }) > return column_set > } >@@ -196,8 +200,8 @@ export default { > : "-" > return usage > }, >- searchable: true, >- orderable: true, >+ searchable: false, >+ orderable: false, > }) > }) > } else { >@@ -232,8 +236,8 @@ export default { > : "-" > return usage > }, >- searchable: true, >- orderable: true, >+ searchable: false, >+ orderable: false, > }) > } > }) >@@ -255,8 +259,8 @@ export default { > : "-" > return usage > }, >- searchable: true, >- orderable: true, >+ searchable: false, >+ orderable: false, > }) > }) > } >@@ -268,8 +272,8 @@ export default { > column_set.push({ > title: __("YOP"), > data: "yop", >- searchable: true, >- orderable: true, >+ searchable: false, >+ orderable: false, > }) > } > metric_types.forEach(metric => { >@@ -331,8 +335,8 @@ export default { > column_set.push({ > title: __("Period total"), > data: "usage_total", >- searchable: true, >- orderable: true, >+ searchable: false, >+ orderable: false, > }) > } > return column_set >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/stores/usage-reports.js b/koha-tmpl/intranet-tmpl/prog/js/vue/stores/usage-reports.js >index ff3028ec5f..13bef074d9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/stores/usage-reports.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/stores/usage-reports.js >@@ -26,8 +26,8 @@ export const useReportsStore = defineStore("reports", { > column: { > title: __("Data provider"), > data: "provider_name", >- searchable: true, >- orderable: true, >+ searchable: false, >+ orderable: false, > }, > }, > 2: { >@@ -38,8 +38,8 @@ export const useReportsStore = defineStore("reports", { > column: { > title: __("Publisher"), > data: "publisher", >- searchable: true, >- orderable: true, >+ searchable: false, >+ orderable: false, > }, > }, > 3: { >@@ -50,8 +50,8 @@ export const useReportsStore = defineStore("reports", { > column: { > title: __("Platform"), > data: "platform", >- searchable: true, >- orderable: true, >+ searchable: false, >+ orderable: false, > }, > }, > 4: { >@@ -62,8 +62,8 @@ export const useReportsStore = defineStore("reports", { > column: { > title: __("Publisher ID"), > data: "publisher_id", >- searchable: true, >- orderable: true, >+ searchable: false, >+ orderable: false, > }, > }, > 5: { >@@ -74,8 +74,8 @@ export const useReportsStore = defineStore("reports", { > column: { > title: __("Online ISSN"), > data: "online_issn", >- searchable: true, >- orderable: true, >+ searchable: false, >+ orderable: false, > }, > }, > 6: { >@@ -86,8 +86,8 @@ export const useReportsStore = defineStore("reports", { > column: { > title: __("Print ISSN"), > data: "print_issn", >- searchable: true, >- orderable: true, >+ searchable: false, >+ orderable: false, > }, > }, > 7: { >@@ -98,8 +98,8 @@ export const useReportsStore = defineStore("reports", { > column: { > title: __("DOI"), > data: "title_doi", >- searchable: true, >- orderable: true, >+ searchable: false, >+ orderable: false, > }, > }, > 8: { >@@ -110,8 +110,8 @@ export const useReportsStore = defineStore("reports", { > column: { > title: __("URI"), > data: "title_uri", >- searchable: true, >- orderable: true, >+ searchable: false, >+ orderable: false, > }, > }, > }, >-- >2.39.3 (Apple Git-146)
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 36925
:
167544
|
167545
|
167592
|
167856
|
167857
|
167858
|
167862
|
167863