Package com.atlassian.jira.rest.client.api.domain

Examples of com.atlassian.jira.rest.client.api.domain.IssueField


//  }

  @Test
  public void testParseIssueWithUserPickerCustomFieldEmpty() throws JSONException {
    final Issue issue = parseIssue("/json/issue/valid-user-picker-custom-field-empty.json");
    final IssueField extraUserIssueField = issue.getFieldByName("Extra User");
    assertNotNull(extraUserIssueField);
    assertNull(extraUserIssueField.getValue());
  }
View Full Code Here


        }
        // TODO: JRJC-122
        // we should use fieldParser here (some new version as the old one probably won't work)
        // enable IssueJsonParserTest#testParseIssueWithUserPickerCustomFieldFilledOut after fixing this
        final Object value = json.opt(key);
        res.add(new IssueField(key, namesMap.get(key), typesMap.get("key"), value != JSONObject.NULL ? value : null));
      } catch (final Exception e) {
        throw new JSONException("Error while parsing [" + key + "] field: " + e.getMessage()) {
          @Override
          public Throwable getCause() {
            return e;
View Full Code Here

        value = valueParser.parse(jsonObject);
      } else {
        value = valueObject.toString();
      }
    }
    return new IssueField(id, name, type, value);
  }
View Full Code Here

        }
        // TODO: JRJC-122
        // we should use fieldParser here (some new version as the old one probably won't work)
        // enable IssueJsonParserTest#testParseIssueWithUserPickerCustomFieldFilledOut after fixing this
        final Object value = json.opt(key);
        res.add(new IssueField(key, namesMap.get(key), typesMap.get("key"), value != JSONObject.NULL ? value : null));
      } catch (final Exception e) {
        throw new JSONException("Error while parsing [" + key + "] field: " + e.getMessage()) {
          @Override
          public Throwable getCause() {
            return e;
View Full Code Here

  @Test
  public void testParse() throws Exception {
    final IssueFieldJsonParser parser = new IssueFieldJsonParser();
    final JSONObject fieldsJs = ResourceUtil.getJsonObjectFromResource("/json/cimField/valid-cim-fields.json");
    final IssueField issueField = parser.parse(fieldsJs.getJSONObject("customfield_10000"), "customfield_10000");
    Assert.assertEquals(1.45, (Double) issueField.getValue(), 0.001);

    final IssueField userIssueField = parser.parse(fieldsJs.getJSONObject("customfield_10020"), "customfield_10020");
    Assert.assertEquals(TestConstants.USER1_BASIC_DEPRECATED, userIssueField.getValue());

  }
View Full Code Here

TOP

Related Classes of com.atlassian.jira.rest.client.api.domain.IssueField

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.