Query bug status from Excel

Peter Bunde Hansen June 24, 2016

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.

3 answers

0 votes
Midori
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 26, 2016

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

0 votes
Peter Bunde Hansen June 24, 2016

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

 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 24, 2016

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")

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 24, 2016
Peter Bunde Hansen June 24, 2016

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

 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 24, 2016

I'm afraid I've managed to stick to Dijkstra's theory and not damage myself by learning any BASIC, especially VBA..

Suggest an answer

Log in or Sign up to answer