Subversion Repositories DevTools

Rev

Rev 4988 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4988 Rev 5375
Line 71... Line 71...
71
    '
71
    '
72
    Dim objXML, qry
72
    Dim objXML, qry
73
    qry = "/rest/api/2/project"
73
    qry = "/rest/api/2/project"
74
 
74
 
75
    Set objXML = Server.CreateObject("MSXML2.ServerXMLHTTP.6.0")
75
    Set objXML = Server.CreateObject("MSXML2.ServerXMLHTTP.6.0")
76
    objXML.Open "GET", JIRA_URL & qry, false
76
    objXML.Open "GET", Application("JIRA_URL") & qry, false
77
    objXML.setRequestHeader "Authorization", "Basic " & Base64Encode(JIRA_CREDENTAILS)
77
    objXML.setRequestHeader "Authorization", "Basic " & Base64Encode(Application("JIRA_CREDENTIALS"))
78
    On Error Resume Next
78
    On Error Resume Next
79
    objXML.Send("")
79
    objXML.Send("")
80
    if Err.Number <> 0 then
80
    if Err.Number <> 0 then
81
        result = 1
81
        result = 1
82
        oJSON.data("emsgSummary") = Err.Description
82
        oJSON.data("emsgSummary") = Err.Description
Line 163... Line 163...
163
        End With
163
        End With
164
    End With
164
    End With
165
    post = iJSON.JSONoutput()
165
    post = iJSON.JSONoutput()
166
 
166
 
167
    Set objXML = Server.CreateObject("MSXML2.ServerXMLHTTP.6.0")
167
    Set objXML = Server.CreateObject("MSXML2.ServerXMLHTTP.6.0")
168
    objXML.Open "POST", JIRA_URL & qry , false
168
    objXML.Open "POST", Application("JIRA_URL") & qry , false
169
    objXML.setRequestHeader "Authorization", "Basic " & Base64Encode(JIRA_CREDENTAILS)
169
    objXML.setRequestHeader "Authorization", "Basic " & Base64Encode(Application("JIRA_CREDENTIALS"))
170
    objXML.setRequestHeader "Content-Type", "application/json"
170
    objXML.setRequestHeader "Content-Type", "application/json"
171
    On Error Resume Next
171
    On Error Resume Next
172
    objXML.Send(post)
172
    objXML.Send(post)
173
    if Err.Number <> 0 then
173
    if Err.Number <> 0 then
174
        result = 1
174
        result = 1
Line 211... Line 211...
211
               Set this = jJSON.data("issues").item(el)
211
               Set this = jJSON.data("issues").item(el)
212
               Set fields = this.item("fields")
212
               Set fields = this.item("fields")
213
 
213
 
214
                Set newitem = oJSON.AddToCollection(oJSON.data("issues"))
214
                Set newitem = oJSON.AddToCollection(oJSON.data("issues"))
215
                newitem.add "key",this.item("key")
215
                newitem.add "key",this.item("key")
216
                newitem.add "url",JIRA_URL & "/browse/" & this.item("key")
216
                newitem.add "url",Application("JIRA_URL") & "/browse/" & this.item("key")
217
                newitem.add "statusIcon",fields.item("status").item("iconUrl")
217
                newitem.add "statusIcon",fields.item("status").item("iconUrl")
218
                newitem.add "status",fields.item("status").item("name")
218
                newitem.add "status",fields.item("status").item("name")
219
                newitem.add "issuetypeIcon",fields.item("issuetype").item("iconUrl")
219
                newitem.add "issuetypeIcon",fields.item("issuetype").item("iconUrl")
220
                newitem.add "issuetype",fields.item("issuetype").item("name")
220
                newitem.add "issuetype",fields.item("issuetype").item("name")
221
                newitem.add "priorityIcon",fields.item("priority").item("iconUrl")
221
                newitem.add "priorityIcon",fields.item("priority").item("iconUrl")