I need to query the status of a bug, from VBA code in an Excel sheet.
Which strategy is best, for such an external query? Which interfaces are provided by JIRA?
We use cloud JIRA.
Have you tried this with the Better Excel Plugin's VBA capabilities? It sounds as that is an inverse of the approach your original question suggests, but that may even be a better approach.
http://www.midori-global.com/products/jira-better-excel-plugin/documentation/visual-basic-macros
Using the below VBA code (I intentionally replaced my pwd with xxx) I got the error: Run-time error '-2147024891 (80070005)'
Sub Makro1() Dim JiraAuth As New MSXML2.XMLHTTP60 Dim LogInREST As Boolean
Dim sErg As String Dim sPfad As String Dim Cookie As String
'Login to JIRA with the default user' With JiraAuth .Open "POST", "http://pension.atlassian.net/jira" & "/rest/auth/1/session", False .setRequestHeader "Content-Type", "application/json" .setRequestHeader "Accept", "application/json"
.send " {""username"" : """ & "pbh@pension.dk" & """, ""password"" : """ & "xxx" & """}"" '*** HTTP-Request senden"
If .Status = "200" Then MsgBox ("Hurra!") Cookie = "JSESSIONID=" & Mid(sErg, 42, 32) & "; Path=/" & sPfad LogInREST = True End If
End With
End Sub
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm afraid that's a runtime error in the application you're coding in, it's nothing to do with JIRA (unless that has sent back a request VBA can't process, but even then, it should only return JSON or a simple "can't do that")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use the REST API: https://docs.atlassian.com/jira/REST/latest/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nic
Thanks, but I cannot find any example VBA code to try out. Could you point to some?
Does VBA instantiate any class to authenticate, and how do I install that class on the client side?
BW Peter Hansen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm afraid I've managed to stick to Dijkstra's theory and not damage myself by learning any BASIC, especially VBA..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.