CDR Tickets

Issue Number 3990
Summary Custom Validation rule for MediaLink element
Created 2015-10-21 17:33:55
Issue Type Improvement
Submitted By Osei-Poku, William (NIH/NCI) [C]
Assigned To Kline, Bob (NIH/NCI) [C]
Status Closed
Resolved 2016-03-23 18:52:59
Resolution Fixed
Path /home/bkline/backups/jira/ocecdr/issue.172468
Description

Please create a new custom validation rule for the MediaLink element in the Summary schema so that it will check to ensure that both language and audience attributes of the Caption element in the linked media doc match the language and audience of the summary document. The publishing software checks for this and reports all summary documents that fail to publish due to either a mis-match or a missing attribute. However, it would be better to be notified before the summary is made publishable rather than after it fails publishing.

[Schema, Schema Validator, SQL, XSLT]

Comment entered 2016-02-09 22:01:20 by alan

Implementing this with our combination of schema, SQL, and XSLT is a twisty little brain bender. I don't think we've done anything this complicated before in our schema validation extensions. However I have a design for a way to do it. I'll try to put it together on Thursday and see if I can make it work.

Comment entered 2016-02-22 17:58:11 by alan

I believe this is now working on DEV. I have installed the modified SummarySchema on DEV and checked it in to version control,

Comment entered 2016-02-22 17:58:38 by alan

Resolved as fixed.

Comment entered 2016-02-23 14:14:38 by Osei-Poku, William (NIH/NCI) [C]

It looks like I have to wait until we can log back into DEV to test this.

Comment entered 2016-02-23 16:02:00 by alan

Yes.

I have restarted the CDR service on DEV in case you have time to test today.

We have a general plan to fix the disk space problem on DEV. If I can free up the space I'll just leave it running permanently. Otherwise I'll turn it off again before I leave tonight.

Comment entered 2016-02-23 16:52:29 by alan

I have recovered enough space on the DEV server to leave it permanently running. Testing can be done whenever it is convenient.

Comment entered 2016-02-24 15:45:15 by Osei-Poku, William (NIH/NCI) [C]

I have done some tests and it appears to be working correctly. We'll be doing more testing and will let you know if we find any problems.

Comment entered 2016-03-23 16:13:08 by Osei-Poku, William (NIH/NCI) [C]

It appears that the validation error comes up for HP summaries even if the linked Media doc has the right Language and Audience marked.

Example:
CDR0000062687 - Summary
CDR0000415499 - Media

I also found out the the rule requires that there should always be a Caption for the Media doc. That is not always the case for existing Media docs, but I don't think that is a problem because we can ensure that there is always a caption in the media doc but we will probably need a report of all Media docs without a caption in advance in order to create new captions for them.

Comment entered 2016-03-23 16:16:18 by Kline, Bob (NIH/NCI) [C]

William:

Don't forget to back the ticket out of the Resolved/Fixed state to make it obvious that there's still work to do when you find bugs in the implementation of a request.

Comment entered 2016-03-23 16:46:48 by Kline, Bob (NIH/NCI) [C]

Requested query can be found in https://cdr.cancer.gov/cgi-bin/cdr/CdrQueries.py under the title "Media documents without captions."

Comment entered 2016-03-23 16:51:28 by Kline, Bob (NIH/NCI) [C]

I believe I have found and fixed the problem with the custom rule. It looks like you're using Health professsionals (with a space) in the Summary documents, but Health_professionals (with an underscore) in the Media documents. Please give it another try (on DEV).

Comment entered 2016-03-23 18:36:45 by Osei-Poku, William (NIH/NCI) [C]

William:
Don't forget to back the ticket out of the Resolved/Fixed state to make it obvious that there's still work to do when you find bugs in the implementation of a request.

Sure. Forgot about that :-).

Comment entered 2016-03-23 18:37:21 by Osei-Poku, William (NIH/NCI) [C]

Requested query can be found in https://cdr.cancer.gov/cgi-bin/cdr/CdrQueries.py under the title "Media documents without captions."

Thanks!

Comment entered 2016-03-23 18:38:44 by Osei-Poku, William (NIH/NCI) [C]

I believe I have found and fixed the problem with the custom rule. It looks like you're using Health professsionals (with a space) in the Summary documents, but Health_professionals (with an underscore) in the Media documents. Please give it another try (on DEV).

Thanks! It seems to be working correctly now. I will do more testing and let you know if I find any problems.

Comment entered 2016-03-23 18:43:05 by Osei-Poku, William (NIH/NCI) [C]

Please exclude MP3 Media docs without captions from the report. We just need the JPEG media docs.

Comment entered 2016-03-23 18:52:59 by Kline, Bob (NIH/NCI) [C]

New ad-hoc query created called "Non-MP3 Media documents without captions."

Comment entered 2016-03-23 21:33:02 by Osei-Poku, William (NIH/NCI) [C]

Thanks! Only two (one English and one Spanish) active terms are without captions on PROD.

Comment entered 2016-03-24 22:46:07 by Osei-Poku, William (NIH/NCI) [C]

Verified on DEV.

Comment entered 2016-03-31 10:57:01 by Juthe, Robin (NIH/NCI) [E]

Verified on QA (per Amy).

Comment entered 2016-05-16 19:35:29 by Osei-Poku, William (NIH/NCI) [C]

Verified on PROD.

Elapsed: 0:00:00.001093