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

Examples of com.atlassian.jira.rest.client.api.domain.input.TransitionInput


    final Issue issue = client.getIssueClient().getIssue("TST-2").claim();
    assertNull(issue.getResolution());
    final Iterable<Transition> transitions = client.getIssueClient().getTransitions(issue).claim();
    final Transition resolveTransition = TestUtil.getTransitionByName(transitions, "Resolve Issue");

    client.getIssueClient().transition(issue, new TransitionInput(resolveTransition.getId())).claim();

    final Issue resolvedIssue = client.getIssueClient().getIssue("TST-2").claim();
    final Resolution basicResolution = resolvedIssue.getResolution();
    assertNotNull(basicResolution);
View Full Code Here


    final Transition transitionFound = TestUtil.getTransitionByName(transitions, "Estimate");
    assertNotNull(transitionFound);
    assertTrue(Iterables.contains(transitionFound.getFields(),
        new Transition.Field(NUMERIC_CUSTOMFIELD_ID, false,
            IntegrationTestUtil.TESTING_JIRA_5_OR_NEWER ? NUMERIC_CUSTOMFIELD_TYPE_V5 : NUMERIC_CUSTOMFIELD_TYPE)));
    client.getIssueClient().transition(issue, new TransitionInput(transitionFound.getId(), Arrays.asList(fieldInput),
        Comment.valueOf("My test comment"))).claim();
    final Issue changedIssue = client.getIssueClient().getIssue("TST-1").claim();
    assertTrue(changedIssue.getField(NUMERIC_CUSTOMFIELD_ID).getValue().equals(expectedValue));
  }
View Full Code Here

    assertTrue(Iterables.contains(transitionFound.getFields(),
        new Transition.Field(NUMERIC_CUSTOMFIELD_ID, false,
            IntegrationTestUtil.TESTING_JIRA_5_OR_NEWER ? NUMERIC_CUSTOMFIELD_TYPE_V5 : NUMERIC_CUSTOMFIELD_TYPE)));
    final double newValue = 123;
    final FieldInput fieldInput = new FieldInput(NUMERIC_CUSTOMFIELD_ID, newValue);
    client.getIssueClient().transition(issue.getTransitionsUri(), new TransitionInput(transitionFound.getId(), Arrays
        .asList(fieldInput),
        Comment.valueOf("My test comment"))).claim();
    final Issue changedIssue = client.getIssueClient().getIssue("TST-1").claim();
    assertEquals(newValue, changedIssue.getField(NUMERIC_CUSTOMFIELD_ID).getValue());
  }
View Full Code Here

    // since 5.0 messages are changed and not localized
    assertErrorCode(Response.Status.BAD_REQUEST, TESTING_JIRA_5_OR_NEWER
        ? "Operation value must be a number" : "']432jl' nie jest prawid\u0142ow\u0105 liczb\u0105", new Runnable() {
      @Override
      public void run() {
        client.getIssueClient().transition(issue, new TransitionInput(transitionFound.getId(), Arrays.asList(fieldInput),
            Comment.valueOf("My test comment"))).claim();
      }
    });
  }
View Full Code Here

    final String errorMsg = doesJiraServeCorrectlyErrorMessagesForBadRequestWhileTransitioningIssue()
        ? expectedErrorMsg : null;
    assertErrorCode(Response.Status.BAD_REQUEST, errorMsg, new Runnable() {
      @Override
      public void run() {
        client.getIssueClient().transition(issue, new TransitionInput(transitionFound.getId(), comment)).claim();
      }
    });
  }
View Full Code Here

  private void testTransitionImpl(Comment comment) {
    final Issue issue = client.getIssueClient().getIssue("TST-1").claim();
    final Iterable<Transition> transitions = client.getIssueClient().getTransitions(issue).claim();
    Transition transitionFound = TestUtil.getTransitionByName(transitions, "Estimate");
    DateTime now = new DateTime();
    client.getIssueClient().transition(issue, new TransitionInput(transitionFound.getId(), comment)).claim();

    final Issue changedIssue = client.getIssueClient().getIssue("TST-1").claim();
    final Comment lastComment = Iterables.getLast(changedIssue.getComments());
    assertEquals(comment.getBody(), lastComment.getBody());
    assertEquals(IntegrationTestUtil.USER_ADMIN, lastComment.getAuthor());
View Full Code Here

    assertEquals(4, Iterables.size(transitions));
    final Transition startProgressTransition = new Transition("Start Progress", IntegrationTestUtil.START_PROGRESS_TRANSITION_ID, Collections
        .<Transition.Field>emptyList());
    assertTrue(Iterables.contains(transitions, startProgressTransition));

    client.getIssueClient().transition(issue, new TransitionInput(IntegrationTestUtil.START_PROGRESS_TRANSITION_ID,
        Collections.<FieldInput>emptyList(), Comment.valueOf("My test comment"))).claim();
    final Issue transitionedIssue = client.getIssueClient().getIssue("TST-1").claim();
    assertEquals("In Progress", transitionedIssue.getStatus().getName());
    final Iterable<Transition> transitionsAfterTransition = client.getIssueClient().getTransitions(issue).claim();
    assertFalse(Iterables.contains(transitionsAfterTransition, startProgressTransition));
View Full Code Here

    final Transition transitionFound = TestUtil.getTransitionByName(transitions, "Estimate");
    assertNotNull(transitionFound);
    assertTrue(Iterables.contains(transitionFound.getFields(),
        new Transition.Field(NUMERIC_CUSTOMFIELD_ID, false,
            IntegrationTestUtil.TESTING_JIRA_5_OR_NEWER ? NUMERIC_CUSTOMFIELD_TYPE_V5 : NUMERIC_CUSTOMFIELD_TYPE)));
    client.getIssueClient().transition(issue, new TransitionInput(transitionFound.getId(), Arrays.asList(fieldInput),
        Comment.valueOf("My test comment"))).claim();
    final Issue changedIssue = client.getIssueClient().getIssue("TST-1").claim();
    assertTrue(changedIssue.getField(NUMERIC_CUSTOMFIELD_ID).getValue().equals(expectedValue));
  }
View Full Code Here

    assertTrue(Iterables.contains(transitionFound.getFields(),
        new Transition.Field(NUMERIC_CUSTOMFIELD_ID, false,
            IntegrationTestUtil.TESTING_JIRA_5_OR_NEWER ? NUMERIC_CUSTOMFIELD_TYPE_V5 : NUMERIC_CUSTOMFIELD_TYPE)));
    final double newValue = 123;
    final FieldInput fieldInput = new FieldInput(NUMERIC_CUSTOMFIELD_ID, newValue);
    client.getIssueClient().transition(issue.getTransitionsUri(), new TransitionInput(transitionFound.getId(), Arrays
        .asList(fieldInput),
        Comment.valueOf("My test comment"))).claim();
    final Issue changedIssue = client.getIssueClient().getIssue("TST-1").claim();
    assertEquals(newValue, changedIssue.getField(NUMERIC_CUSTOMFIELD_ID).getValue());
  }
View Full Code Here

    // since 5.0 messages are changed and not localized
    assertErrorCode(Response.Status.BAD_REQUEST, TESTING_JIRA_5_OR_NEWER
        ? "Operation value must be a number" : "']432jl' nie jest prawid\u0142ow\u0105 liczb\u0105", new Runnable() {
      @Override
      public void run() {
        client.getIssueClient().transition(issue, new TransitionInput(transitionFound.getId(), Arrays.asList(fieldInput),
            Comment.valueOf("My test comment"))).claim();
      }
    });
  }
View Full Code Here

TOP

Related Classes of com.atlassian.jira.rest.client.api.domain.input.TransitionInput

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.