开发者

How do I get all values in a JIRA multi-checkbox customfield with SOAP?

I'm developing a web application that uses SOAP to communicate with JIRA. I have a custom field that contains several checkboxes, and I can get this field through SOAP, but I can't get to the开发者_C百科 actual checkboxes it contains. Is there a way to do this?


Since nobody has answered this so far, here is an old copy of some JavaScript I did for JIRA, reading customfields.

var unitlist_val = $("#unitList_0").val();
var errorlist_val = $("#errorList_0").val();
var larmlist_val = $("#larmList_0").val();

var URL= ""+jira+"/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml jqlQuery=project+%3D+"+problem+
         "+AND+%22Symptom+1+-+Component%22+~+%22+"+unitlist_val+"%22+AND+%22Symptom+2+-+State%22+~+%22"+errorlist_val+
         "%22+AND+%22Symptom+3+-+alarm%22+~+%22"+larmlist_val+
         "%22&tempMax=1000&field=title&field=link&field=customfield_10422&field=customfield_10423&field=customfield_10424&field=customfield_10420&field=resolution&field=customfield_10440";

    $.ajax({
        type: "GET",
        url: URL,
        dataType: "xml",
        cache: false,
        beforeSend: function(request) {
            request.setRequestHeader("Accept", "text/xml; charset=utf-8");
        },
        success: function(data){
            $(data).find("item").each(function(){
                // Make sure swedish chars, are handled properly. Append to page first, then get value.
                var unitList = $("<div/>").html($(this).find("#customfield_10422 customfieldvalue").text()).text().split(",");
                var errorList = $("<div/>").html($(this).find("#customfield_10423 customfieldvalue").text()).text().split(",");
                var alarmList = $("<div/>").html($(this).find("#customfield_10424 customfieldvalue").text()).text().split(",");
                var knownerror = $("<div/>").html($(this).find("#customfield_10420 customfieldvalue").text()).text() || "None";
                var resolution = $("<div/>").html($(this).find("resolution").text()).text() || "None";
       }
    });

You can probably do something similar in Java and use a simple GET request. I cut out quite a lot of code, so some parts might be syntax error on.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜