Bug 126883 - bugzilla.dtd isn't quite correct

r=gerv, justdave
This commit is contained in:
bbaetz%student.usyd.edu.au 2002-04-04 04:19:58 +00:00
Родитель 3ff4ae877e
Коммит 2df551b1ef
4 изменённых файлов: 21 добавлений и 3 удалений

Просмотреть файл

@ -248,7 +248,7 @@ sub emitXML {
$xml .= "<bug>\n"; $xml .= "<bug>\n";
foreach my $field ("bug_id", "urlbase", "bug_status", "product", foreach my $field ("bug_id", "bug_status", "product",
"priority", "version", "rep_platform", "assigned_to", "delta_ts", "priority", "version", "rep_platform", "assigned_to", "delta_ts",
"component", "reporter", "target_milestone", "bug_severity", "component", "reporter", "target_milestone", "bug_severity",
"creation_ts", "qa_contact", "op_sys", "resolution", "bug_file_loc", "creation_ts", "qa_contact", "op_sys", "resolution", "bug_file_loc",

Просмотреть файл

@ -248,7 +248,7 @@ sub emitXML {
$xml .= "<bug>\n"; $xml .= "<bug>\n";
foreach my $field ("bug_id", "urlbase", "bug_status", "product", foreach my $field ("bug_id", "bug_status", "product",
"priority", "version", "rep_platform", "assigned_to", "delta_ts", "priority", "version", "rep_platform", "assigned_to", "delta_ts",
"component", "reporter", "target_milestone", "bug_severity", "component", "reporter", "target_milestone", "bug_severity",
"creation_ts", "qa_contact", "op_sys", "resolution", "bug_file_loc", "creation_ts", "qa_contact", "op_sys", "resolution", "bug_file_loc",

Просмотреть файл

@ -5,7 +5,7 @@
maintainer CDATA #REQUIRED maintainer CDATA #REQUIRED
exporter CDATA #IMPLIED exporter CDATA #IMPLIED
> >
<!ELEMENT bug (bug_id, (exporter?, urlbase?, bug_status, product, priority, version, rep_platform, assigned_to, delta_ts, component, reporter, target_milestone?, bug_severity, creation_ts, qa_contact?, op_sys, resolution?, bug_file_loc?, short_desc?, keywords*, status_whiteboard?, dependson*, blocks*, cc*, long_desc*, attachment*)?)> <!ELEMENT bug (bug_id, (bug_status, product, priority, version, rep_platform, assigned_to, delta_ts, component, reporter, target_milestone?, bug_severity, creation_ts, qa_contact?, op_sys, resolution?, bug_file_loc?, short_desc?, keywords*, status_whiteboard?, dependson*, blocks*, cc*, long_desc*, attachment*)?)>
<!ATTLIST bug <!ATTLIST bug
error (NotFound | NotPermitted | InvalidBugId) #IMPLIED error (NotFound | NotPermitted | InvalidBugId) #IMPLIED
> >

Просмотреть файл

@ -140,6 +140,24 @@ if (exists $::FORM{'rebuildvotecache'}) {
print "OK, now running sanity checks.<P>\n"; print "OK, now running sanity checks.<P>\n";
# This one goes first, because if this is wrong, then the below tests
# will probably fail too
# This isn't extensible. Thats OK; we're not adding any more enum fields
Status("Checking for invalid enumeration values");
foreach my $field (("bug_severity", "bug_status", "op_sys",
"priority", "rep_platform", "resolution")) {
# undefined enum values in mysql are an empty string which equals 0
SendSQL("SELECT bug_id FROM bugs WHERE $field=0 ORDER BY bug_id");
my @invalid;
while (MoreSQLData()) {
push (@invalid, FetchOneColumn());
}
if (@invalid) {
Alert("Bug(s) found with invalid $field value: ".join(', ',@invalid));
}
}
CrossCheck("keyworddefs", "id", CrossCheck("keyworddefs", "id",
["keywords", "keywordid"]); ["keywords", "keywordid"]);