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

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


        assertThat(firstItem.getParentName(), is("JIRA Internal Directory"));

        assertThat(firstRecord.getChangedValues(), notNullValue());

        final Iterator<AuditChangedValue> iterator = firstRecord.getChangedValues().iterator();
        final AuditChangedValue valueItem1 = iterator.next();
        assertThat(valueItem1.getFieldName(), is("Username"));
        assertThat(valueItem1.getChangedFrom(), nullValue());
        assertThat(valueItem1.getChangedTo(), is("admin"));

        final AuditChangedValue valueItem2 = iterator.next();
        assertThat(valueItem2.getFieldName(), is("Full Name"));
        assertThat(valueItem2.getChangedFrom(), is("administrator"));
        assertThat(valueItem2.getChangedTo(), is("admin"));

        final AuditChangedValue valueItem3 = iterator.next();
        assertThat(valueItem3.getFieldName(), is("Email"));
        assertThat(valueItem3.getChangedTo(), is("admin@local.com"));

        final AuditChangedValue valueItem4 = iterator.next();
        assertThat(valueItem4.getFieldName(), is("Active / Inactive"));
        assertThat(valueItem4.getChangedTo(), is("Active"));

        //check second firstRecord which does not contain optional fields
        final AuditRecord secondRecord = recordsIterator.next();
        assertThat(secondRecord.getSummary(), is("User added to group"));
        assertThat(secondRecord.getRemoteAddress(), nullValue());
View Full Code Here


    public AuditChangedValue parse(final JSONObject json) throws JSONException {
        final String fieldName = json.getString("fieldName");
        final String changedFrom = JsonParseUtil.getOptionalString(json, "changedFrom");
        final String changedTo = JsonParseUtil.getOptionalString(json, "changedTo");

        return new AuditChangedValue(fieldName, changedTo, changedFrom);
    }
View Full Code Here

TOP

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

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.