What do I use for "newline" character when adding a multiline comment to a WI via curl?
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
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.------------------------------------------------
THIS IS A SAMPLE
------------------------------------------------
Comments
Kevin Ramer
Dec 02 '13, 3:41 p.m.This will be a WAG, but maybe try <br/> ?
Donald Poulin
Dec 04 '13, 8:37 a.m.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