Mercurial > pub > buggler
diff bug-list.xsl @ 10:14a966369278
working version of exporting bugs from bugzilla in tj3 format (without bookings)
author | cin |
---|---|
date | Mon, 07 Sep 2015 01:37:11 +0300 |
parents | 2a5f38eb25a9 |
children | 4eb9fdf4efa9 |
line wrap: on
line diff
--- a/bug-list.xsl Sat Sep 05 22:01:12 2015 +0300 +++ b/bug-list.xsl Mon Sep 07 01:37:11 2015 +0300 @@ -22,9 +22,9 @@ <xsl:variable name="bugs" select="/bugzilla/bug" /> - <xsl:key name="bugid" match="/bugzilla/bug" use="string(bug_id)" /> + <xsl:key name="bugid" match="/bugzilla/bug" use="string(id)" /> - <xsl:variable name="roots" select="$bugs[not(blocked[key('bugid',.)])]" /> + <xsl:variable name="roots" select="$bugs[not(blocks[key('bugid',.)])]" /> <!-- BUILD BUG TREE --> <xsl:variable name="tree"> @@ -33,11 +33,11 @@ <xsl:template match="bug" mode="tree"> <xsl:element name="bug"> - <xsl:attribute name="id"><xsl:value-of select="bug_id" /></xsl:attribute> + <xsl:attribute name="id"><xsl:value-of select="id" /></xsl:attribute> <xsl:if test="component = 'product' or not(number(estimated_time))"> <xsl:attribute name="group"><xsl:value-of select="boolean(1)" /></xsl:attribute> </xsl:if> - <xsl:for-each select="dependson"> + <xsl:for-each select="depends_on"> <xsl:apply-templates mode="tree" select="key('bugid', .)" /> </xsl:for-each> </xsl:element> @@ -49,7 +49,7 @@ </xsl:variable> <xsl:template match="bug" mode="relations"> - <xsl:variable name="bugid" select="string(bug_id)" /> + <xsl:variable name="bugid" select="string(id)" /> <bug id="{$bugid}"> <!-- calculate all palaces where the same node appears --> <xsl:apply-templates select="exsl:node-set($tree)//bug[@id = $bugid]" @@ -106,20 +106,20 @@ <!-- applied in context of the bugzilla document --> <xsl:template match="bug" mode="structure"> - <xsl:variable name="id" select="string(bug_id)" /> + <xsl:variable name="id" select="string(id)" /> <xsl:variable name="self" select="." /> <xsl:variable name="children" select="exsl:node-set($parents)/bug[@parent = $id]" /> <xsl:element name="bug"> <xsl:attribute name="id"><xsl:value-of select="$id" /></xsl:attribute> - <xsl:attribute name="desc"><xsl:value-of select="short_desc" /></xsl:attribute> + <xsl:attribute name="desc"><xsl:value-of select="summary" /></xsl:attribute> <xsl:if test="$children"> <xsl:attribute name="group"><xsl:value-of select="boolean($children)" /></xsl:attribute> <xsl:for-each select="$children"> <xsl:variable name="child" select="@id" /> - <xsl:apply-templates select="$bugs[bug_id = $child]" + <xsl:apply-templates select="$bugs[id = $child]" mode="structure" /> </xsl:for-each> @@ -128,7 +128,7 @@ <!-- filter out dependencies --> <!-- exclude children, and missing bugs --> <xsl:variable name="dependencies" - select="dependson[not(text() = exsl:node-set($parents)/bug/parent[@id=$id]/@bugid)][key('bugid', .)]" /> + select="depends_on[not(text() = exsl:node-set($parents)/bug/parent[@id=$id]/@bugid)][key('bugid', .)]" /> <xsl:for-each select="$dependencies"> <dependency id="{.}" /> </xsl:for-each> @@ -147,7 +147,7 @@ <xsl:param name="indent" select="0" /> <xsl:param name="chargeset" /> <xsl:variable name="id" select="@id" /> - <xsl:variable name="details" select="$bugs[bug_id = $id]" /> + <xsl:variable name="details" select="$bugs[id = $id]" /> <xsl:variable name="hasTime" select="number($details/estimated_time) or number($details/actual_time) or number($details/remaining_time)" />