Skip to main content
1-Visitor
Nov 9, 2012 8:13 PM UTC
Question

How to attach a file to a CR from command line

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

    5 replies

    1-Visitor
    Nov 12, 2012 5:24 PM UTC

    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.

    Translate
    1-Visitor
    Mar 1, 2013 9:49 AM UTC

    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.

    Translate
    1-Visitor
    Mar 1, 2013 5:55 PM UTC

    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

    Translate