summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjocuri%softhome.net <>2005-01-17 05:34:51 +0100
committerjocuri%softhome.net <>2005-01-17 05:34:51 +0100
commit1ce889ad699125ad4cab16404b40f0df8fd3bf5b (patch)
treeee5574df1cda4b221e1e04aee3af7146093834c3
parent698c612d21b422d02797dbf30c8bdef2bc0bb9ad (diff)
downloadbugzilla-1ce889ad699125ad4cab16404b40f0df8fd3bf5b.tar.gz
bugzilla-1ce889ad699125ad4cab16404b40f0df8fd3bf5b.tar.xz
Patch for bug 171478: XML bug output should include attachment flags; patch by Colin S. Ogilvie <colin.ogilvie@gmail.com>, r=wurblzap, a=myk.
-rw-r--r--bugzilla.dtd13
-rw-r--r--template/en/default/bug/show.xml.tmpl21
2 files changed, 32 insertions, 2 deletions
diff --git a/bugzilla.dtd b/bugzilla.dtd
index 82ccfff18..f9ced933b 100644
--- a/bugzilla.dtd
+++ b/bugzilla.dtd
@@ -47,9 +47,20 @@
<!ELEMENT who (#PCDATA)>
<!ELEMENT bug_when (#PCDATA)>
<!ELEMENT thetext (#PCDATA)>
-<!ELEMENT attachment (attachid, date, desc, type?, data?)>
+<!ELEMENT attachment (attachid, date, desc, type?, data?, flag*)>
+<!ATTLIST attachment
+ isobsolete (0|1) #IMPLIED
+ ispatch (0|1) #IMPLIED
+>
<!ELEMENT attachid (#PCDATA)>
<!ELEMENT date (#PCDATA)>
<!ELEMENT desc (#PCDATA)>
<!ELEMENT type (#PCDATA)>
<!ELEMENT data (#PCDATA)>
+<!ELEMENT flag EMPTY>
+<!ATTLIST flag
+ name CDATA #REQUIRED
+ status CDATA #REQUIRED
+ setter CDATA #IMPLIED
+ requestee CDATA #IMPLIED
+>
diff --git a/template/en/default/bug/show.xml.tmpl b/template/en/default/bug/show.xml.tmpl
index 8b29537a4..6c950a2bf 100644
--- a/template/en/default/bug/show.xml.tmpl
+++ b/template/en/default/bug/show.xml.tmpl
@@ -65,10 +65,29 @@
[% IF displayfields.attachment %]
[% FOREACH a = bug.attachments %]
[% NEXT IF a.isprivate && !UserInGroup(Param("insidergroup")) %]
- <attachment>
+ <attachment
+ [% IF a.isobsolete %]
+ isobsolete="1"
+ [% END %]
+ [% IF a.ispatch %]
+ ispatch="1"
+ [% END %]
+ >
<attachid>[% a.attachid %]</attachid>
<date>[% a.date FILTER time FILTER xml %]</date>
<desc>[% a.description FILTER xml %]</desc>
+ <ctype>[% a.contenttype FILTER xml %]</ctype>
+ [% FOREACH flag = a.flags %]
+ <flag name="[% flag.type.name FILTER xml %]"
+ status="[% flag.status FILTER xml %]"
+ [% IF flag.setter %]
+ setter="[% flag.setter.email FILTER xml %]"
+ [% END %]
+ [% IF flag.status == "?" && flag.requestee %]
+ requestee="[% flag.requestee.email FILTER xml %]"
+ [% END %]
+ />
+ [% END %]
</attachment>
[% END %]
[% END %]