What do I use for "newline" character when adding a multiline comment to a WI via curl?
Donald Poulin (224●9●119●107)
| asked Dec 02 '13, 2:39 p.m.
edited Dec 02 '13, 4:23 p.m. by Krzysztof Kaźmierczyk (7.5k●4●80●103)
Using REXX I created a multi line stem variable and concatenated a "0A" to the end of each line and then wrote the stem structure to a file (omvs). I then used iconv to convert the file I created to UTF-8 and then added the new comment via a curl command. I see the comment ok within the work item but it is all one line. I have tried using "0D"x instead of "0A"x but I am still seeing a single line that "wraps" within the comment/discussion section of the work item. What is the secret to getting a multi-line comment to show up as multiple lines within a work item?
|
2 answers
Hello,
I have been using XML input, with cURL to send it, to create a workitem and update the description field. I was using <br/> directly in the XML, but RTC was stripping that out, and giving one line of text in the field. To get the linefeed or break to happen I use the & way to describe the lt and gt characters. I use this and it works for me (remove the spaces when you do it): & lt;br/& gt; Regards Mark Noonan |
"0d0a"x gives me a newline if I concat it to another string. I have a little script that creates commented section headers for bash scripts:
SAY "Name your section:" PARSE UPPER PULL title comment = "#------------------------------------------------#" comment = comment"0d0a"x comment = comment"#"CENTER(title,48)"#" comment = comment"0d0a"x comment = comment"#------------------------------------------------#" SAY comment Which writes: I believe you need both 0d and 0a much like you would use \r\n in an extended expression replace. Comments
David Steimle
commented May 17 '17, 7:52 a.m.
Wow, that formatted strangely...
Ralph Schoon
commented May 17 '17, 10:51 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
In a world where everything uses the same characters for everything (XML, HTML, **ML) this is almost unavoidable.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.
Comments
This will be a WAG, but maybe try <br/> ?
Tried and still same issue. I am running REXX under zOS omvs and want to add a multiline comment to a work item and have the individual lines show up as separate lines in the work item comment. I can successfully add the comment to the work item via curl and the oslc api but it shows as one continuous line