Commit 048d4e35 authored by gerv%gerv.net's avatar gerv%gerv.net

Bug 521398 - make XML version of bug supply more data (flags, comment IDs etc.)…

Bug 521398 - make XML version of bug supply more data (flags, comment IDs etc.) Patch by gerv; r,a=LpSolit.
parent bd068592
...@@ -43,6 +43,9 @@ ...@@ -43,6 +43,9 @@
<!ELEMENT everconfirmed (#PCDATA)> <!ELEMENT everconfirmed (#PCDATA)>
<!ELEMENT cc (#PCDATA)> <!ELEMENT cc (#PCDATA)>
<!ELEMENT group (#PCDATA)> <!ELEMENT group (#PCDATA)>
<!ATTLIST group
id CDATA #REQUIRED
>
<!ELEMENT estimated_time (#PCDATA)> <!ELEMENT estimated_time (#PCDATA)>
<!ELEMENT remaining_time (#PCDATA)> <!ELEMENT remaining_time (#PCDATA)>
<!ELEMENT actual_time (#PCDATA)> <!ELEMENT actual_time (#PCDATA)>
...@@ -52,6 +55,7 @@ ...@@ -52,6 +55,7 @@
encoding (base64) #IMPLIED encoding (base64) #IMPLIED
isprivate (0|1) #IMPLIED isprivate (0|1) #IMPLIED
> >
<!ELEMENT commentid (#PCDATA)>
<!ELEMENT who (#PCDATA)> <!ELEMENT who (#PCDATA)>
<!ELEMENT bug_when (#PCDATA)> <!ELEMENT bug_when (#PCDATA)>
<!ELEMENT work_time (#PCDATA)> <!ELEMENT work_time (#PCDATA)>
...@@ -61,9 +65,11 @@ ...@@ -61,9 +65,11 @@
isobsolete (0|1) #IMPLIED isobsolete (0|1) #IMPLIED
ispatch (0|1) #IMPLIED ispatch (0|1) #IMPLIED
isprivate (0|1) #IMPLIED isprivate (0|1) #IMPLIED
isurl (0|1) #IMPLIED
> >
<!ELEMENT attachid (#PCDATA)> <!ELEMENT attachid (#PCDATA)>
<!ELEMENT date (#PCDATA)> <!ELEMENT date (#PCDATA)>
<!ELEMENT delta_ts (#PCDATA)>
<!ELEMENT desc (#PCDATA)> <!ELEMENT desc (#PCDATA)>
<!ELEMENT filename (#PCDATA)> <!ELEMENT filename (#PCDATA)>
<!ELEMENT type (#PCDATA)> <!ELEMENT type (#PCDATA)>
...@@ -75,6 +81,8 @@ ...@@ -75,6 +81,8 @@
<!ELEMENT flag EMPTY> <!ELEMENT flag EMPTY>
<!ATTLIST flag <!ATTLIST flag
name CDATA #REQUIRED name CDATA #REQUIRED
id CDATA #REQUIRED
type_id CDATA
status CDATA #REQUIRED status CDATA #REQUIRED
setter CDATA #IMPLIED setter CDATA #IMPLIED
requestee CDATA #IMPLIED requestee CDATA #IMPLIED
......
...@@ -62,25 +62,13 @@ ...@@ -62,25 +62,13 @@
[% END %] [% END %]
[%# Bug Flags %] [%# Bug Flags %]
[% IF displayfields.flag %] [% PROCESS section_flags obj => bug %]
[% FOREACH type = bug.flag_types %]
[% FOREACH flag = type.flags %]
<flag name="[% type.name FILTER xml %]"
id="[% flag.id FILTER xml %]"
status="[% flag.status FILTER xml %]"
setter="[% flag.setter.login FILTER email FILTER xml %]"
[% IF flag.requestee %]
requestee="[% flag.requestee.login FILTER email FILTER xml %]"
[% END %]
/>
[% END %]
[% END %]
[% END %]
[% IF displayfields.long_desc %] [% IF displayfields.long_desc %]
[% FOREACH c = bug.longdescs %] [% FOREACH c = bug.longdescs %]
[% NEXT IF c.isprivate && !user.in_group(Param("insidergroup")) %] [% NEXT IF c.isprivate && !user.in_group(Param("insidergroup")) %]
<long_desc isprivate="[% c.isprivate FILTER xml %]"> <long_desc isprivate="[% c.isprivate FILTER xml %]">
<commentid>[% c.id FILTER xml %]</commentid>
<who name="[% c.author.name FILTER xml %]">[% c.author.email FILTER email FILTER xml %]</who> <who name="[% c.author.name FILTER xml %]">[% c.author.email FILTER email FILTER xml %]</who>
<bug_when>[% c.time FILTER time("%Y-%m-%d %T %z") FILTER xml %]</bug_when> <bug_when>[% c.time FILTER time("%Y-%m-%d %T %z") FILTER xml %]</bug_when>
[% IF user.in_group(Param('timetrackinggroup')) && (c.work_time - 0 != 0) %] [% IF user.in_group(Param('timetrackinggroup')) && (c.work_time - 0 != 0) %]
...@@ -98,9 +86,11 @@ ...@@ -98,9 +86,11 @@
isobsolete="[% a.isobsolete FILTER xml %]" isobsolete="[% a.isobsolete FILTER xml %]"
ispatch="[% a.ispatch FILTER xml %]" ispatch="[% a.ispatch FILTER xml %]"
isprivate="[% a.isprivate FILTER xml %]" isprivate="[% a.isprivate FILTER xml %]"
isurl="[% a.isurl FILTER xml %]"
> >
<attachid>[% a.id %]</attachid> <attachid>[% a.id %]</attachid>
<date>[% a.attached FILTER time("%Y-%m-%d %R %z") FILTER xml %]</date> <date>[% a.attached FILTER time("%Y-%m-%d %T %z") FILTER xml %]</date>
<delta_ts>[% a.modification_time FILTER time("%Y-%m-%d %T %z") FILTER xml %]</delta_ts>
<desc>[% a.description FILTER xml %]</desc> <desc>[% a.description FILTER xml %]</desc>
<filename>[% a.filename FILTER xml %]</filename> <filename>[% a.filename FILTER xml %]</filename>
<type>[% a.contenttype FILTER xml %]</type> <type>[% a.contenttype FILTER xml %]</type>
...@@ -114,16 +104,7 @@ ...@@ -114,16 +104,7 @@
<data encoding="base64">[% a.data FILTER base64 %]</data> <data encoding="base64">[% a.data FILTER base64 %]</data>
[% END %] [% END %]
[% FOREACH flag = a.flags %] [% PROCESS section_flags obj => a %]
<flag name="[% flag.type.name FILTER xml %]"
id="[% flag.id FILTER xml %]"
status="[% flag.status FILTER xml %]"
setter="[% flag.setter.email FILTER email FILTER xml %]"
[% IF flag.status == "?" && flag.requestee %]
requestee="[% flag.requestee.email FILTER email FILTER xml %]"
[% END %]
/>
[% END %]
</attachment> </attachment>
[% END %] [% END %]
[% END %] [% END %]
...@@ -155,3 +136,19 @@ ...@@ -155,3 +136,19 @@
[%- val FILTER xml %]</[% field %]> [%- val FILTER xml %]</[% field %]>
[% END %] [% END %]
[% END %] [% END %]
[% BLOCK section_flags %]
[% RETURN UNLESS displayfields.flag %]
[% FOREACH flag = obj.flags %]
<flag name="[% flag.type.name FILTER xml %]"
id="[% flag.id FILTER xml %]"
type_id="[% flag.type_id FILTER xml %]"
status="[% flag.status FILTER xml %]"
setter="[% flag.setter.email FILTER email FILTER xml %]"
[% IF flag.status == "?" && flag.requestee %]
requestee="[% flag.requestee.email FILTER email FILTER xml %]"
[% END %]
/>
[% END %]
[% END %]
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment