This article provides an example of a configurable Grid that enables users to create issues in a specified Project for all test cases where the Test Case Status is "Not OK". For details on the SystemWeaver Script Language elements utilized in the example, see the application Help.

Example Meta Model

Example Data 


The project must have a Project SID value. You can create and/or obtain this via the Setup>General menu in the project.

To set issue attribute values when the issue(s) are created, the attribute type(s) must already exist in the project. In the example provided, the item attribute TDAT will be mapped to the issue attribute DUTO.

Item Attribute

Issue Attribute

Example Configuration 

		<Parameter caption="Test Suite" name="testSuite" as="Item" hintContextPath="ISES">
				<ForEachPathReference path="ISES">
	<Variable name="test" as="Item" select="."/>
	<Variable name="testCasesNotOk" as="[Item]" select="TopNode/ISSP/ITEC[@PTCS = 'Not OK']/item::[not /issueref::IR]"/>
		<ActionBinding columnIds="issue" actionId="AddIssuesToNotOkTestCases" caption="Add issues to all NotOk test cases" confirmationDialog="true">
			<WithParam name="test" select="$test"/>
			<WithParam name="testCasesNotOk" select="$testCasesNotOk"/>
		<Action id="AddIssuesToNotOkTestCases">
			<Parameter name="test" as="[Item]"/>
			<Parameter name="testCasesNotOk" as="[Item]"/>
			<Log>--- #{? $test.Select(@TDAT)}</Log>
			<ForEach select="$testCasesNotOk">
				<Item id="IT_#{Handle}" match="."/>
				<Issue id="IS_#{Handle}" project="CMS" issueType="Issue" assignedTo="bashar" iteration="#{? if true then 'Iteration 1' else ''}" status="Started" name="Review #{? .}">
					<Attribute sid="DUTO" value="#{? $test.Select(@TDAT.Format(''))}"/>
				<IssueObjRef refType="IR" issue="IS_#{Handle}" obj="IT_#{Handle}" remove="true"/>
		<TextColumn caption="#" width="25" objectName="testCase">#{Part.PartNo}</TextColumn>
		<ItemNameColumn caption="Test Case Name" icon="true" width="200" objectName="testCase"/>
		<ItemVersionColumn caption="TC Version" width="25" objectName="testCase"/>
		<NodeAttributeColumn id="tCStatus" caption="TC Status" readOnly="False" width="75" type="PTCS" objectName="testCase"/>
		<NameColumn id="issue" caption="Issue" readOnly="true" width="200" objectName="Issue"/>
		<IssueIdColumn caption="Issue Id" objectName="Issue" width="100"/>
		<IssueStatusColumn caption="Issue Status" objectName="Issue" width="100"/>
		<IssueAttributeColumn caption="Due To" project="CMS" type="DUTO" readOnly="False" objectName="Issue" width="100"/>
		<AssignedToColumn caption="Assigned To" objectName="Issue" width="100"/>
	<Context name="TestContext">
		<AddParts owner="main" sid="ISSP" part="TestToTestSpec" defobj="TestSpec" nodes="true"/>
		<AddParts owner="TestSpec" sid="ITEC" part="SpecToTestCase" defobj="TestCase" nodes="true"/>
		<AddParts owner="TestCase" sid="ITRQ" part="TestCaseToRequirement" defobj="Requirement"/>
		<AddParts owner="main" sid="IRTS" part="TestToTestSystemPart" defobj="TestSystem"/>
		<AddParts owner="main" sid="ISSU" part="TestToSUTPart" defobj="SUT"/>
		<AddParts owner="p2" sid="ISES" part="Test" defobj="main"/>
	<ForEachInContext name="TestContext" group="main">
			<ContextGoForward part="TestToTestSpec">
				<ContextGoForward part="SpecToTestCase">
					<RowObject name="testCase">
							    <ForEach select="/issueref::IR">
								  <RowObject name="Issue"/>

Example Result  

Users can right-click anywhere in the Issue column and select the action: 

The Execute pop-up will display (the confirmationDialog="true" is optional and can be removed). 

Issues are created per the <Issue> settings. 

Learn more about configuring Actions and ActionBindings in the application Help.