Create vba jira in excel

Asked By 40 points N/A Posted on -

Create vba jira: I wanted to create a jira issue on VBA XML.

The first try worked well. I used a code that successfully created jira.

When i used a different code, it worked well but the update issue failed.

What is wrong with it?

Please help me.

Answered By 0 points N/A #130198

Create vba jira in excel



If your jira version is 4.4.1 now let’s create a jira issue via VBA+SOAP+XML (first shall install soap toolkit, and invoke msxml dll ) the code will successfully "create a jira issue”, but it will fail to update the issue.

Here are the suggestions on how to resolve an issue via excel.

Microsoft Excel Objects

Dim token As Variant

Dim new issue, update issue As Variant

Dim issue map As Variant        

Dim b As Boolean

Dim Soap Client

Set Soap Client = Create Object("MSSOAP.SoapClient30")

SoapClient.mssoapinit ("http://192.168.xx.xx:8079/rpc/soap/jirasoapservice-v2?wsdl")

'token = SoapClient.LogIn("jirauser", "jira")

Token = SoapClient. Log In ("dev", "123")

If Err <> 0 Then

wscript.echo "initialization failed” + Err. Description

End If

Dim new_xmlText, update_xmlText As String

new_xmlText = "<root>" & _

"<assignee>" & Range("A2") & "</assignee>" & _

"<project>" & Range("B2") & "</project>" & _

"<type>" & Range("C2") & "</type>" & _

"<summary>" & Range("D2") & "</summary>" & _


update_xmlText = "<root>" & _

"<id>summary</id>" & _

"<values>" & Range("F3") & "</values>" & _


Dim new_xmlDoc As New MSXML2.DOMDocument30

new_xmlDoc.async = False

new_xmlDoc.LoadXML (new_xmlText)

If (new_xmlDoc.parseError.ErrorCode <> 0) Then

Dim my Err

Set my Err = new_xmlDoc.parseError

MsgBox (myErr.reason)

Go To My End


'MsgBox new_xmlDoc.xml

End If

Dim update_xmlDoc As New MSXML2.DOMDocument30

update_xmlDoc.async = False

update_xmlDoc.LoadXML (update_xmlText)

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 new issue = SoapClient.createIssue(token, new_XMLNodeList)

Dim Field Values(1 To 1) As MSXML2.IXMLDOMNodeList

Dim update_XMLNodeList As MSXML2.IXMLDOMNodeList

Dim update root As MSXML2.IXMLDOMElement

Set update root = update_xmlDoc.DocumentElement

Set update_XMLNodeList = update_root.ChildNodes

Set Field Values(1) = update_XMLNodeList

Set update issue = SoapClient.updateissue(token, Range("C3"), Field Values)

The update issue error will be:org.xml.sax.SAXException: Found the character data inside an  array element while desterilizing. You have to learn about issue syntax of jira update Remote Issue update Issue (java.lang.String token, java.lang.String issueKey, RemoteFieldValue [] actionParams). 

This is the list's failed transfer cause the error or something else?

Login/Register to Answer

Related Questions