Skip to content

Instantly share code, notes, and snippets.

@jamiely
Created December 18, 2012 02:45
Show Gist options
  • Save jamiely/4324549 to your computer and use it in GitHub Desktop.
Save jamiely/4324549 to your computer and use it in GitHub Desktop.
Add a comment to Jira via Soap
add_comment = client.request(:add_comment) do
soap.body do |xml|
xml.in0 token
xml.in1 ticket_num
# create a remote comment
xml.in2('xsi:type' => 'ins0:RemoteComment') {
xml.body "This is a comment from Ruby",
'xsi:type' => 'xsd:string'
xml.author 'xsi:type' => 'xsd:string', 'xsi:nil' => 'true'
xml.created 'xsi:type' => 'xsd:dateTime', 'xsi:nil' => 'true'
xml.groupLevel 'xsi:type' => 'xsd:string', 'xsi:nil' => 'true'
xml.id 'xsi:type' => 'xsd:string', 'xsi:nil' => 'true'
xml.roleLevel 'xsi:type' => 'xsd:string', 'xsi:nil' => 'true'
xml.updateAuthor 'xsi:type' => 'xsd:string', 'xsi:nil' => 'true'
xml.updated 'xsi:type' => 'xsd:dateTime', 'xsi:nil' => 'true'
}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment