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 |
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]
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.
I believe this is now working on DEV. I have installed the modified SummarySchema on DEV and checked it in to version control,
Resolved as fixed.
It looks like I have to wait until we can log back into DEV to test this.
~oseipokuw 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.
I have recovered enough space on the DEV server to leave it permanently running. Testing can be done whenever it is convenient.
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.
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.
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.
Requested query can be found in https://cdr.cancer.gov/cgi-bin/cdr/CdrQueries.py under the title "Media documents without captions."
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).
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 :-).
Requested query can be found in https://cdr.cancer.gov/cgi-bin/cdr/CdrQueries.py under the title "Media documents without captions."
Thanks!
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.
Please exclude MP3 Media docs without captions from the report. We just need the JPEG media docs.
New ad-hoc query created called "Non-MP3 Media documents without captions."
Thanks! Only two (one English and one Spanish) active terms are without captions on PROD.
Verified on DEV.
Verified on QA (per Amy).
Verified on PROD.
Elapsed: 0:00:00.001093