Skip to main content
1-Visitor
October 5, 2015
Solved

Searching im-Command to export all objects of a project as .csv or xlsx

  • October 5, 2015
  • 1 reply
  • 4571 views


Hi, I'm searching an im-command to export all objects (concerns, documents, etc. ) of an Integrity-Project from Workflow&Documents.

Any comments ?

BR Stephan

    Best answer by tketz

    Hi Stephan,

    i think you can do the 3 steps from Kael Lizak in only one (for batch or custom command):

    im exportissues --fieldFilter="Project=/<projectName>" --queryDefinition=...

    there are also options for the outputfile, substitute parameters, displayed fields, ...

    Hope it helps

    Best Regards,

    Tobias

    1 reply

    16-Pearl
    November 30, 2015

    Hi Stephan Klemm,

    Sorry for the late response.  I was hoping I could find something better than what I'm about to suggest:

    1. Create a query to return item types, returning only the types you care about (or no type filter if you really want everything).  Alternatively, you can supply a query definition in the following step instead of a named query, but I'll work on the assumption you're using a named query, and the next step can be modified appropriately for supplying a query definition.
    2. From the command line, you can run the command im issues --filedFilter="Project=/<projectName> --query=[<userName>:]<queryName>, and redirect that to a temporary file with a list of item IDs.  Values between '<>' are place holders, '[]' indicates an optional argument.
    3. Use the output of 2. as the selection file for the command im viewissue -F <selectionFile>, and redirect that output to another file, which will have the information you are looking for.  You may want to pass additional arguments to im viewissue, such as --[no]showRelationships, --[no]showWorkflow, --[no]showHistory, and other such options, to control the exact output for each item type.

    I hope that helps.

    Regards,
    Kael

    tketz1-VisitorAnswer
    1-Visitor
    December 1, 2015

    Hi Stephan,

    i think you can do the 3 steps from Kael Lizak in only one (for batch or custom command):

    im exportissues --fieldFilter="Project=/<projectName>" --queryDefinition=...

    there are also options for the outputfile, substitute parameters, displayed fields, ...

    Hope it helps

    Best Regards,

    Tobias

    16-Pearl
    December 1, 2015

    Hi Tobias Ketz‌,

    If history, workflow (state transitions), and other similar information aren't necessary for the export, then you're right, im exportissues is much cleaner and more efficient!  Thanks for bringing this up, I'd forgotten about it.

    Regards,
    Kael