How to query all defects submitted in Dispatch between two specific dat

0 Likes

PROBLEM/ABSTRACT:
How to query all defects submitted in Dispatch between two specific dates via the CLI.

SOLUTION:
Create an xml file, (example time.xml) and enter the following data:

<queryIssue issueDB = "AccuRev" useAlt = "false" useAltQuery = "false">
<AND>
<condition>
7 == &quot;defect&quot;
</condition>
<condition>
11 &lt;= &quot;1124510400&quot;
</condition>
<condition>
11 &gt;= &quot;1121781106&quot;
</condition>
</AND>
</queryIssue>

Modify these three lines in the xml file.

<queryIssue issueDB = "<enter depot name here>" useAlt = "false" useAltQuery= "false">

11 &lt;= &quot;1124510400&quot; <---Change the less than time.

11 &gt;= &quot;1121781106&quot; <---Change the greater than time.


To obtain the time in seconds, below is a perl script that will perform this function:

use Time::Local;
#$TIME = timelocal($sec, $min, $hours, $mday, $mon, $year);
$TIME = timelocal(0,0,0,20,7,2005);
print $TIME;

To run the query from the CLI, use the syntax:
accurev xml -l query_time.xml


For more information contact AccuRev Support

Comment List
Related
Recommended