[%# 1.0@bugzilla.org %]
[%# The contents of this file are subject to the Mozilla Public
  # License Version 1.1 (the "License"); you may not use this file
  # except in compliance with the License. You may obtain a copy of
  # the License at http://www.mozilla.org/MPL/
  #
  # Software distributed under the License is distributed on an "AS
  # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  # implied. See the License for the specific language governing
  # rights and limitations under the License.
  #
  # The Original Code is the Bugzilla Test Runner System.
  #
  # The Initial Developer of the Original Code is Maciej Maczynski.
  # Portions created by Maciej Maczynski are Copyright (C) 2001
  # Maciej Maczynski. All Rights Reserved.
  #
  # Contributor(s): David Koenig <dkoenig@novell.com>
  #%]

[%# Testopia Test Case XML export template #%]

[% PROCESS global/variables.none.tmpl %]

	<testcase author="[% case.author.email FILTER xml %]" priority="[% case.priority FILTER xml %]" automated="[% case.isautomated ? "Automatic" : "Manual" FILTER xml %]" status="[% case.status FILTER xml %]">
[% IF case.text.action %]
		<action>[% case.text.action FILTER xml %]</action>
[% END %]
[% IF case.alias %]
		<alias>[% case.alias FILTER xml %]</alias>
[% END %]
[% IF case.arguments %]
		<arguments>[% case.arguments FILTER xml %]</arguments>
[% END %]
[% IF case.blocked %]
	[% FOREACH blocked_test_case = case.blocked %]
		<blocks type="Xml_description">[% blocked_test_case.summary FILTER xml %]</blocks>
	[% END %]
[% END %]
[% IF case.text.breakdown %]
		<breakdown>[% case.text.breakdown FILTER xml %]</breakdown>
[% END %]
[% IF case.category.name %]
		<categoryname>[% case.category.name FILTER xml %]</categoryname>
[% END %]
[% IF case.components %]
	[% FOREACH component = case.components %]
		<component product="[% component.product_name %]">[% component.name FILTER xml %]</component>
	[% END %]
[% END %]
[% IF case.default_tester.email %]
		<defaulttester>[% case.default_tester.email FILTER xml %]</defaulttester>
[% END %]
[% IF case.dependson %]
	[% FOREACH dependson_test_case = case.dependson %]
		<dependson type="Xml_description">[% dependson_test_case.summary FILTER xml %]</dependson>
	[% END %]
[% END %]
[% IF case.text.effect %]
		<expectedresults>[% case.text.effect FILTER xml %]</expectedresults>
[% END %]
[% IF case.requirement %]
		<requirement>[% case.requirement FILTER xml %]</requirement>
[% END %]
[% IF case.script %]
		<script>[% case.script FILTER xml %]</script>
[% END %]
[% IF case.text.setup %]
		<setup>[% case.text.setup FILTER xml %]</setup>
[% END %]
[% IF case.summary %]
		<summary>[% case.summary FILTER xml %]</summary>
[% END %]
[% IF case.tags %]
	[% FOREACH tag = case.tags %]
		<tag>[% tag.name FILTER xml %]</tag>
	[% END %]
[% END %]
[% IF case.plans %]
	[% FOREACH test_plan = case.plans %]
		<testplan_reference type="Xml_description">[% test_plan.name FILTER xml %]</testplan_reference>
	[% END %]
[% END %]
	</testcase>
	