https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41921 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #48 from David Nind <david@davidnind.com> --- I managed to work my way through the test plans 8-) A couple of things I have noted: 1. When accessing the standard background jobs page (Administration > Jobs > Manage jobs) you get a browser popup with this error and table sits on "Processing ...": Something went wrong when loading the table 500: Internal Server error. Properties not allowed: report_id. Properties not allowed: report_id. Properties not allowed: report_id. Properties not allowed: report_id. Properties not allowed: report_id. .... In the developer tools console I get: GET http://127.0.0.1:8081/api/v1/jobs?only_current=0&_page=1&_per_page=20&_match=contains&_order_by=-me.enqueued_date 500 (Internal Server Error) Got 500 (Internal Server Error) 2. For the "Reports job" page for the "Currently running" section: - There is a "X Clear filter" option which is greyed out, but there is no search box or other controls apart from "Export" - Nothing works for me when entering anything in the column filters. - Filters (search + column) work OK in the "Background jobs" section. Consolidated test plan (so far) =============================== 1. Apply all the patches 2. Update the database: updatedatabase 3. Rebuild things (not sure if it is required): - yarn api:bundle - yarn build 4. DBIC (not sure if it is required): dbic 5. Update koha-conf.xml: - Edit koha-conf.xml: vi /etc/koha/sites/kohadev/koha-conf.xml - Added this after </plugin_repos> (near the end of file but before CSP section): <total_running_reports_per_instance_limit>1</total_running_reports_per_instance_limit> 6. Restart everything: restart_all 7. Tests pass: prove t/db_dependent/Koha/BackgroundJob/RunReport.t t/db_dependent/Koha/Reports.t t/Koha/Auth/Permissions.t t/db_dependent/api/v1/reports_jobs.t 8. Create a report using SQL: select * from biblio 9. Run through the individual test plans for: - Add ability to run reports as background jobs - Add check_limits to guided_reports.pl - Wire check_limits into svc/report and opac/svc/report - Add per-run-type overrides to report concurrency caps - Add a Report jobs dashboard for librarians - Add currently-running reports to the dashboard Add ability to run reports as background jobs ============================================= Check the different settings for the new system preference ReportsRunInBackground: - 'always run as a background job' (always): . Run the report . Confirm a job appears under Administration > Jobs > Manage jobs (admin/background_jobs.pl) with type 'Run report'. . Once finished, click 'View results' on the job page and confirm the stored result renders in the standard report-results view. - 'always run in the foreground' (never): . Run the report. . Confirm it executes in the foreground. - 'let the user choose' (user_choice): . Run the report. . Confirm the 'choose run mode' page is shown with a Background checkbox preselected, and the report runs accordingly. Results: 'always run as a background job' (always) ----------------------------------------- 1. After clicking "Run" action, goes to the "Report jobs" page: . Information message at the top of the page: "Your report has been queued as job #XX. It is highlighted below." . "Currently running" heading with "No reports are running right now" . "Background jobs" heading: lists background jobs with the current job highlighted with an orange border around the table . Clicking "View results" action: gives you the report results 2. When accessing the standard background jobs page (Administration > Jobs > Manage jobs) you get a browser popup with this error and the table sits on "Processing ...": Something went wrong when loading the table 500: Internal Server error. Properties not allowed: report_id. Properties not allowed: report_id. Properties not allowed: report_id. Properties not allowed: report_id. Properties not allowed: report_id. .... In the developer tools console I get: GET http://127.0.0.1:8081/api/v1/jobs?only_current=0&_page=1&_per_page=20&_match=contains&_order_by=-me.enqueued_date 500 (Internal Server Error) Got 500 (Internal Server Error) 'always run in the foreground' (never) -------------------------------------- 1. After clicking "Run" action, you get the report results page. 2. When accessing the background jobs page I get the same results as 'always' option 'let the user choose' (user_choice) ----------------------------------- 1. After clicking "Run" action, get: How would you like to run this report? "Run now" "Queue as background job" 2. Run now: report runs 3. Queue as background job: get "Report jobs" page 4. When accessing the background jobs page I get the same results as 'always' and 'never' options. Add check_limits to guided_reports.pl ===================================== 1. Added koha-conf.xml setting earlier, as got errors on the report pages otherwise. 2. Create a new saved report with this SQL: SELECT SLEEP(120) 3. Results from running the report in two different tabs: - First tab: eventually completes - Second tab: you eventually (but not straight away) get this message: The following error was encountered: There are too many total reports running at the moment. Please wait for some of them to finish before running this report again. Return to previous page 4. On the same two tabs using Download > Comma separated text (CSV): - First tab: eventually saves CSV - Second tab: get a page with a white background and "Too many reports are currently running. Please wait for some to finish before running this report." Wire check_limits into svc/report and opac/svc/report ===================================================== 1. Step 4: Make the report public. 2. Results as per the test plan. Add per-run-type overrides to report concurrency caps ===================================================== 1. Edit koha-conf.xml and change and add settings: <total_running_reports_per_instance_limit>5</total_running_reports_per_instance_limit> <foreground_total_running_reports_per_instance_limit>2</foreground_total_running_reports_per_instance_limit> 2. Restart everything: restart_all Add a Report jobs dashboard for librarians =========================================== 1. For the "Cancel" option to come up under "background jobs" section, need to start a couple of reports running. 2. Found it hard to test steps 8 and 9, so skipped. Add currently-running reports to the dashboard ============================================== Works as expected. However, note that for the "Currently running" section: 1. There is a "X Clear filter" option which is greyed out, but there is no search box or other controls apart from "Export" 2. Nothing works for me when entering anything in the column filters. 3. Filters (search + column) work OK in the "Background jobs" section. -- You are receiving this mail because: You are watching all bug changes.