Issue Number | 3718 |
---|---|
Summary | [Glossary] Validation rule for GTCs with Related External Ref links for both English and Spanish |
Created | 2014-02-10 10:55:02 |
Issue Type | New Feature |
Submitted By | Osei-Poku, William (NIH/NCI) [C] |
Assigned To | alan |
Status | Closed |
Resolved | 2014-03-25 09:55:08 |
Resolution | Fixed |
Path | /home/bkline/backups/jira/ocecdr/issue.118297 |
--For discussion towards the possible addition to the next CDR release.
We have come across a few publishing errors that were caused by users failure to assign the UseWith attribute (Related External Ref) when there are entries for both English and Spanish in the GTC. It looks like when there is only one entry, it defaults to English but when another one is added but the UseWith attribute is not selected for both English and Spanish, it prevents the associated terms from being published. If it is possible, add a validation rule to the GTC schema so that when Related External Ref elements are added for both English and Spanish, it will require the selection of the UseWith attribute. Alternatively this may be handled in the vendor filters but our first choice is a validation error at the time of making the entries in the document.
I'm in the office today and will take a look at this.
I'd like to go over the rules that we want for this at our next
CDR
meeting, tomorrow afternoon.
The schema does not actually specify the UseWith values but
probably
should, "en" or "es". The DTD is more specific. It requires "en"
or
"es" and there was a failure last week caused by an "Es" value
instead
of "es". Because our schema didn't catch it, the error wasn't
reported
until publishing - which is too late to fix it for that run.
This doesn't sound like the error reported in this issue. If it's
not,
can I get the specific error information for this problem, i.e.,
the
error message and the source (if you can tell) - publishing or
Gatekeeper?
The schema specifies UseWith in two different elements,
RelatedExternalRef and RelatedSummaryRef. I presume we want the rule
to
apply separately to each of these, i.e., one RelatedExternalRef plus
one
RelatedSummaryRef does not equate to two UseWith attributes for
the
purposes of this issue.
The schema imposes no limit on the number of these elements. I
presume
it is sometimes desirable (or at least not illegal) to have more
than
two instances of one of the elements, and therefore to have more
than
one with an "en" value and/or more than one with an "es" value. I
presume that in such a case what we are asking for here is that
the
validation require this to be explicit, i.e., two different
elements
each with UseWith='en' rather than two that have no UseWith at all.
Or do we also want it to be illegal to have two with the same value
-
which would require a different change to the schema.
The 'Es' error you saw from last week is not what I am referring to.
That has actually been corrected now.
I do not remember that we received a particular error message for this
type of error that I am referring to. I do remember though that pub
preview failed for the affected glossary terms. However, I tried to
reproduce the error on DEV a few minutes ago to see if I can get the
error message but there was no error message and pub preview worked
without a problem (even without specifying the attribute for the two
RelatedExternalRef in the document (CCDR0000619361). So, I am not sure
if it is a GK or publishing error. All I know is that the changes did
not make it to Cancer.gov.
We do want the rule to apply to only RelatedExternalRef which is the
element the problem arose from. You're right about there not being a
limit on the number of the elements that is allowed. The rule should
only apply when there is more than one instance of the
RelatedExternalRef element.
I've made the following changes to the schema for GlossaryTermConcept:
1. I created a list of valid values for both the RelatedExternalRef
and the RelatedSummaryRef UseWith attributes. The only valid
values are:
"en"
"es"
Anything else will generate a validation error.
It will still be legal to have no UseWith attribute, but if there
is one, it must have one of those two values.
2. I tested the presence of RelatedExternalRef/@UseWith attributes.
If there is only one RelatedExternalRef element, the UseWith
attribute is ignored by the validation rule. It may be present or
not.
If there are more than one RelatedExternalRef elements, the number
of RelatedExternalRef/@UseWith attributes in the document must
exactly match the number of RelatedExternalRef elements. If any of
the elements does not have a UseWith attribute, the element is
invalid.
It would be simple to copy and apply this rule to the
RelatedSummaryRef elements too if that is desired.
The changes are on DEV only and not yet in subversion. I haven't done a
great deal of testing but I think I covered each possible case. The
changes can be tested in DEV.
All of the changes are in the schema. No code has been modified. So I
think that we can put this into production without waiting for a patch
or release - though we might want to add it to the patch or release
tracking in JIRA.
I tested this on DEV and everything appears to be working correctly as described. We will do additional testing and report if there are any issues.
We've completed testing on DEV. The changes worked as expected. Please apply the same rule to RelatedSummaryRef element.
I have installed the validation rule for RelatedSummaryRef matching the change for RelatedExternalRef.
The changes are on DEV and in subversion.
Verified on DEV.
Verified on QA.
Verified on PROD. Thank you!
Elapsed: 0:00:00.001376