Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-25087

When using JIRA 4.4's SOAP API the values for Multi Select and Select List fields are incorrect

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Medium Medium
    • None
    • 4.4 - EAP
    • None

      Create a custom field of type Multi Select or Select List
      Create an issue and choose some non-empty values for the custom field.
      Run the following java code (with the obvious changes).

      JiraSoapServiceServiceLocator l = new JiraSoapServiceServiceLocator();
      JiraSoapService service = l.getJirasoapserviceV2( new URL("YOUR_JIRA_URL_HERE/rpc/soap/jirasoapservice-v2?wsdl')"));
      String auth = service.login("YOUR_USER_NAME_HERE","YOUR_PASSWORD_HERE");
      service.getIssueTypes(auth);
      RemoteIssue issue = jrc.getService().getIssue(auth,"YOUR_ISSUE_KEY_HERE");
      RemoteCustomFieldValue[] rcfv = issue.getCustomFieldValues();
      for (int i=0; i<rcfv.length; i++)

      { System.out.println("Custom field value "+rcfv[i].getCustomfieldId()+":"+rcfv[i].getKey()+":"+Arrays.toString(rcfv[i].getValues())); }

      It should print out the value that you selected for the custom field (plus the values of other custom fields), but instead it prints out some kind of primary key information that presumably corresponds to Jira's internal representation for these fields. The code works on Jira 4.1.2. I haven't tried it on intermediate versions, but it fails on Jira 4.4-rc2.

            Unassigned Unassigned
            c61a4808e21d John Armstrong
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: