Skip to main content
1-Visitor
October 31, 2012
Solved

How to add multi-line "Work Description" using CLI?

  • October 31, 2012
  • 2 replies
  • 10451 views

I try to add multi-line "work description" using command line interface?

Similar to the follwong:

im editissue --field="Work Description"="Hello\nThank"?

It seems to me that \n does not create and line feed.

Also can we add file from content in a file?

Thank you

    Best answer by ptc-4671727

    This also works:

    im editissue --field='Comments=Adding new lines^

    Line1^

    Line2' 123456

    Note: Double quote (") is replaced with single quote (')

    Balu

    2 replies

    1-Visitor
    October 31, 2012

    You have to escape with ^.

    Replace \n by ^\n.

    HTH

    1-Visitor
    October 31, 2012

    Thank you for the reply.

    But it does not work very well.

    When I run this command:

    im editissue --field="Work Description"="Line1^\n Line2" 6210729

    On Integrity web client, it still shows like this:

    [izhang, 31-Oct-2012 9:50:36 AM EDT]

    Line1\n Line2

    Any more suggestion? Thanks in advance.

    1-Visitor
    October 31, 2012

    This is just off the top of my head and hasn't been tested, but have you tried " \r\n "?

    1-Visitor
    November 1, 2012

    If "Work Description" is a rich longtext field, you can use the "im editissue --richContentField=field=value" command. As Jeremy pointed out with <br>, rich content fields are HTML format.

    1-Visitor
    November 2, 2012

    Thank you for all the reply.

    "Work Description" is not a rich text filed. Therefore, <br/> does not work.

    I talked to PTC Integrity tech support yesterday and this morning. Currently they do not support this. They will create an RFC for this feature.

    I have to use Java API for this.

    Thanks.

    1-Visitor
    October 29, 2013

    This also works:

    im editissue --field='Comments=Adding new lines^

    Line1^

    Line2' 123456

    Note: Double quote (") is replaced with single quote (')

    Balu