How do I export all artifacts in a Tracker using CLI?
Exporting all artifact data in a Tracker is possible using a CLI script. Below is a sample script for exporting all artifacts in a particular Tracker.
export -header id,title,assignedTo,createdBy,createdDate,description
ctf set ID `print id`
ctf set TITLE `print title`
ctf set ASSIGNEDTO `print assignedTo`
ctf set CREATEDBY `print createdBy`
ctf set CREATEDDATE `print createdDate`
ctf set DESCRIPTION `print description`
Replace tracker Id in line 2 appropriately. Artifact fields can be added based on the need. To know the exact artifact fields used in a Tracker, use the commands below in CLI:
Steps to execute the script from Windows CLI client
- Open CLI client and connect with Prod site
- Open Windows command line as administrator
- Navigate to CLI setup location (where CLI.exe is saved)
- In Windows command line, execute the script by
- CLI.exe <script location>
- Example: CLI.exe C:\listartifact.ctf
- Output will be stored as exportedtracker.csv in the current location of the command line.
Internal reference: #123823
Please sign in to leave a comment.