Hi I created an Issue via SOAP using VBA,
(I used the code written By fabby chen https://answers.atlassian.com/questions/75585/create-jira-issues-using-vba-in-excel)
But unfortunately I don't know how to receive the created issue KEY.
Sub CreateJiraIssue() Dim token As Variant Dim newissue As Variant Dim issuemap As Variant Dim SoapClient Set SoapClient = CreateObject("MSSOAP.SoapClient30") SoapClient.mssoapinit ("https://jira_instance/rpc/soap/jirasoapservice-v2?wsdl") token = SoapClient.LogIn("jirauser", "password") If Err <> 0 Then wscript.echo "initialization failed " + Err.description End If Dim new_xmlText, update_xmlText As String new_xmlText = "<root>" & _ "<assignee>" & "user" & "</assignee>" & _ "<project>" & "PROJECT1" & "</project>" & _ "<type>" & "1" & "</type>" & _ "<summary>" & "TEST TICKET " & "</summary>" & _ "<description>" & "this ticket was created remotely via SOAP using VBA code." & "</description>" & _ "<customFieldValues>" & _ "<RemoteCustomFieldValue>" & _ "<customfieldId>customfield_10002</customfieldId>" & _ "<values><string>" & "XXX" & "</string></values>" & _ "</RemoteCustomFieldValue>" & _ "<RemoteCustomFieldValue>" & _ "<customfieldId>customfield_10001</customfieldId>" & _ "<values><string>" & "XXX" & "</string></values>" & _ "</RemoteCustomFieldValue>" & _ "</customFieldValues>" & _ "</root>" Dim new_xmlDoc As New MSXML2.DOMDocument30 new_xmlDoc.async = False new_xmlDoc.LoadXml (new_xmlText) If (new_xmlDoc.parseError.ErrorCode <> 0) Then Dim myErr Set myErr = new_xmlDoc.parseError MsgBox (myErr.reason) End If Dim new_XMLNodeList As MSXML2.IXMLDOMNodeList Dim new_root As MSXML2.IXMLDOMElement Set new_root = new_xmlDoc.DocumentElement Set new_XMLNodeList = new_root.ChildNodes Set newissue = SoapClient.createIssue(token, new_XMLNodeList) End Sub
anyone knows how to get the Key of the issue created?
Hi
I just figured it out:
Dim read_XMLNodeList As MSXML2.IXMLDOMNodeList Dim issueKey As String Set read_XMLNodeList = newissue issueKey = read_XMLNodeList(15).Text
Doesn't this work: newissue.getKey() ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.