Skip to main content
1-Visitor
November 9, 2012
Question

How to attach a file to a CR from command line

  • November 9, 2012
  • 1 reply
  • 3273 views

Is there a command line that attaches a file to a Change Request ?

    1 reply

    1-Visitor
    November 12, 2012

    You can add an attachemnt to any item type by using the "im editissue" command with the "--addAttachment" or "--updateAttachment" parameter.

    The syntax is "im editissue --addAttachment="field=<FieldName>,path=<c:/path/to/file/filename.xyz>" <itemID>"

    There is additional documentation on this command in the CLI reference for Workflows and Documents pdf.

    1-Visitor
    March 1, 2013

    Hi Matt,

    I'm trying to Attach a file to an Item using JAVA API calls and was succeded (running API call using Local Client). However i'm not able to attach a file to an Item by running the same Java API call at Server side. I'm getting the below error.

    "Could not save item: File paths must be rooted in C:\Program Files\Integrity\IntegrityServer10\data\tmp: InternalFile is set to C:\Users\XXX.txt"

    Would appreciate any suggestions.

    1-Visitor
    March 1, 2013

    I haven't attached any files from server side java, but from the error message, I think there may be some security feature so it only allows to upload files deep inside the Integrity Server's install directory (C:\Program Files\Integrity\IntegrityServer10\data\tmp).

    With that said, you may want to open an official Support Case to make sure that bringing files into the \IntegrityServer10\data\tmp\ directory won't run into any issues with how Integrity itself uses that directory.

    Hope that helps,

    Matt