CDR Tickets

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
Description

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

Comment entered 2019-11-18 16:33:01 by Kline, Bob (NIH/NCI) [C]

: 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:

 

#----------------------------------------------------------------------
# Let the user pick the version for most Summary or Glossary reports.
# OCECDR-4190: let the user pick the version for drug information summaries.
#----------------------------------------------------------------------
letUserPickVersion = False
if not version:
    if docType in ('Summary', 'GlossaryTermName'):
        if repType and repType not in ('pp', 'gtnwc'):
            letUserPickVersion = True
    if docType == "DrugInformationSummary":
        letUserPickVersion = True
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. 😛

Comment entered 2019-11-18 17:09:48 by Englisch, Volker (NIH/NCI) [C]

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.

Comment entered 2019-11-18 17:52:36 by Englisch, Volker (NIH/NCI) [C]

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.

Comment entered 2019-11-18 19:27:38 by Kline, Bob (NIH/NCI) [C]

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. 🙂

 

: 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.

Comment entered 2019-11-18 19:56:55 by Osei-Poku, William (NIH/NCI) [C]

Yes, please skip the version page. That is what we want.

Comment entered 2019-11-18 22:34:30 by Kline, Bob (NIH/NCI) [C]

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.

Comment entered 2019-11-18 23:44:41 by Kline, Bob (NIH/NCI) [C]

I think I have found and modified at least most, if not all of them.

Comment entered 2019-11-19 10:30:03 by Englisch, Volker (NIH/NCI) [C]

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.

Comment entered 2019-11-19 11:30:31 by Kline, Bob (NIH/NCI) [C]

Version/option page bypassed.

Comment entered 2019-11-20 10:19:16 by Osei-Poku, William (NIH/NCI) [C]

Verified on QA2. Thanks!

Comment entered 2020-02-26 16:55:22 by Osei-Poku, William (NIH/NCI) [C]

I get a python script error when I click on the links that are supposed to go to the summary QC reports

Comment entered 2020-02-26 17:04:09 by Kline, Bob (NIH/NCI) [C]

Reassigned to , as we've reverted to the version of the QC report script which he understands.

Comment entered 2020-02-26 17:48:41 by Englisch, Volker (NIH/NCI) [C]

The following filter has been fixed to correct this issue:

  • CDR433163 - Media QC Report Filter

This is ready to review on DEV.

Comment entered 2020-03-03 15:17:53 by Osei-Poku, William (NIH/NCI) [C]

Verified on DEV. Thanks!

Comment entered 2020-03-03 19:01:39 by Englisch, Volker (NIH/NCI) [C]

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:

Please verify on PROD and close this ticket.

Comment entered 2020-03-18 16:33:51 by Osei-Poku, William (NIH/NCI) [C]

Verified on PROD. Thanks!

Attachments
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