Issue Number | 4715 |
---|---|
Summary | [Media] Media QC Report - Links to summary goes to interface |
Created | 2019-11-18 15:28:24 |
Issue Type | Bug |
Submitted By | Osei-Poku, William (NIH/NCI) [C] |
Assigned To | Englisch, Volker (NIH/NCI) [C] |
Status | Closed |
Resolved | 2020-02-26 17:48:54 |
Resolution | Fixed |
Path | /home/bkline/backups/jira/ocecdr/issue.252506 |
The links within the Media QC Report that goes to summaries go to the interface in the admin menu instead of directly to the summaries QC report. Example: 795013
~volker: Please help, I'm baffled. The URL for the first summary linked from the media document is
https://cdr.cancer.gov/cgi-bin/cdr/QcReport.py?Session=guest&ReportType=pat&DocId=CDR62965
so you can see the report type for this summary QC report is "pat" which I thought was one of the types for which we let the user pick the version. Here is the code that decides (on PROD) whether to show the page from which the user can choose a specific version along with all the other options available on that page:
----------------------------------------------------------------------
#for most Summary or Glossary reports.
# Let the user pick the version -4190: let the user pick the version for drug information summaries.
# OCECDR----------------------------------------------------------------------
#= False
letUserPickVersion if not version:
if docType in ('Summary', 'GlossaryTermName'):
if repType and repType not in ('pp', 'gtnwc'):
= True
letUserPickVersion if docType == "DrugInformationSummary":
= True
letUserPickVersion if letUserPickVersion:
.... show that page with all the options .... #
This is a summary, and we don't have a version, and the report type is named, and it's not "pp" and it's not "gtnwc" and yet on PROD, the server jumps past the version/options page (which I assume is what William wants to happen, since he filed this ticket). Why is this happening? What am I missing? I thought I was preserving the logic of the old code, but clearly that code is even sneakier and more complicated than I realized. 😛
I don't remember that we have ever been asking the users to specify the version of a summary QC report when we're linking to it from a QC report. We only let the users pick the version on the initial document.
I'm looking through the (old) code to see what I can find.
This is a summary, and we don't have a version, and the report type is named
Yes, the document is a summary but the URL doesn't specify a docType, only a docID and a ReportType. Therefore letUserPickVersion should still be False after the if-block: We don't have a version and we don't have a docType.
Not sure how I would know that, reading that code (and its comment), but OK. Let's just say I'm glad we're rewriting this script. 🙂
~oseipokuw: if you confirm that you want to skip the version screen in this scenario (in spite of what the comment in the script's code says), I will modify the code.
Yes, please skip the version page. That is what we want.
OK. In the interest of preserving the sanity of any programmers who come after us, rather than modify the QC report script so that it goes back to interpreting the absence of the document type parameter to mean "we don't want to ask the user for the version we should use for the report" I'm going to add a parameter to the link in the Media QC report to specify that we want to use the CWD. This means that we may need to find other places relying on the absence of the document type parameter in this same way and modify them, too. Keep your eyes out for any other such reports, William.
I think I have found and modified at least most, if not all of them.
Not sure how I would know that
That's right, you wouldn't know that if you don't often work with these type o QC reports.
Version/option page bypassed.
Verified on QA2. Thanks!
I get a python script error when I click on the links that are supposed to go to the summary QC reports
Reassigned to ~volker, as we've reverted to the version of the QC report script which he understands.
The following filter has been fixed to correct this issue:
CDR433163 - Media QC Report Filter
This is ready to review on DEV.
Verified on DEV. Thanks!
The filter change has been copied to QA, STAGE, and PROD.
I was unable to run a diff report on the change because of the way media files are processed in the publishing software. However, since this was a minor filter change (and not affecting the vendor output, for instance) I went ahead to copy the change to production.
The following filter has been updated:
CDR433163 - Media QC Report Filter
https://github.com/NCIOCPL/cdr-server/commit/ca0abd195
Please verify on PROD and close this ticket.
Verified on PROD. Thanks!
File Name | Posted | User |
---|---|---|
Media QC Report.PNG | 2019-11-18 15:27:51 | Osei-Poku, William (NIH/NCI) [C] |
Elapsed: 0:00:00.001635