Bug #13553

Reports page: Continue button shown on archival units with no file or item descriptions; clicking leads to 500 error

Added by Dan Gillean 2 months ago. Updated about 1 month ago.

Status:Code ReviewStart date:08/10/2021
Priority:MediumDue date:
Assignee:-% Done:

0%

Category:Reporting
Target version:Release 2.7.0
Google Code Legacy ID: Tested version:2.6, 2.7
Sponsored:No Requires documentation:No

Description

First reported in the user forum, 2021-08-10: https://groups.google.com/g/ica-atom-users/c/dGIaUeOENEM/m/DXsmuCxWAgAJ

Reproduced locally in stable/2.6.x and qa/2.x.

The reports page displays options for reports that cannot be generated, such as offering an option for authenticated users to generate a physical storage report when no physical storage information is associated with the related description. For public users, the behavior is worse. Normally public users can trigger the creation of file and/or item reports without needing to authenticate. However, if no files or items exist in the archival unit, the "Continue" button is still displayed, despite the fact that a message is displayed saying "There are no relevant reports for this". When clicked, the Continue button leads to a 500 error.

To reproduce

  • Navigate to a top level description with no file or item descendants as a public user
  • On the view page of the description, click on the reports button in the right-hand context menu
  • Page will say "There are no relevant reports for this item." Click the "Continue" button in the button block at the bottom of the page

Resulting error

  • 500 error
2021/08/10 13:10:56 [error] 1393#1393: *13 FastCGI sent in stderr: "PHP message: Cannot redirect to an empty URL" while reading response header from upstream, client: 10.10.10.1, server: _, request: "POST /a-richard-king-fonds/informationobject/reports HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.atom.sock:", host: "10.10.10.10", referrer: "http://10.10.10.10/a-richard-king-fonds/informationobject/reports" 

Expected behavior

Either:

  • The "Continue" button should not display if there are no reports to generate, or
  • The "Continue" button should have the same effect as the "Cancel" button when clicked if there are no reports to generate - returning the user to the view page of the related description

Related issue - Ability for authenticated users to generate empty storage report when no storage information is available on a description

Another behavior that is not ideal, but does not lead to a 500 error, is that the option to generate a storage report or a box label list is available for authenticated users on all descriptions, even when no storage information is linked to the target archival unit. Initiating generation will launch a job, but the job details page displays the message:

[info] [2021-08-10 06:25:09] Job 2030862 "arGenerateReportJob": Job started.
[info] [2021-08-10 06:25:09] Job 2030862 "arGenerateReportJob": No results found for Physical storage locations report.
[info] [2021-08-10 06:25:09] Job 2030862 "arGenerateReportJob": Job finished.

To reproduce

  • Log in
  • Navigate to an archival unit with no associated physical storage information
  • Click on the reports button in the right-hand context menu
  • On the reports configuration page, select "Physical storage locations" or "Box label", and then click the Continue button
  • Navigate to Manage > Jobs and click through to the details for the related report generation job

Resulting error

  • No report is generated because there is no information to display

Expected result

  • Options to generate reports should not be displayed if the requisite information to create the report is not present on the target archival unit

History

#1 Updated by Mike Cantelon about 1 month ago

  • Status changed from New to In progress

#2 Updated by Mike Cantelon about 1 month ago

  • Status changed from In progress to Code Review

#3 Updated by Dan Gillean about 1 month ago

  • Target version set to Release 2.7.0
  • Requires documentation set to No

Also available in: Atom PDF