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

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


    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)));
    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")), pm);
    final Issue changedIssue = client.getIssueClient().getIssue("TST-1", pm);
    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")), pm);
      }
    });
  }
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), pm);
      }
    });
  }
View Full Code Here

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

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

    restClient.getIssueClient().watch(issue.getWatchers().getSelf(), pm);

    // now let's start progress on this issue
    final Iterable<Transition> transitions = restClient.getIssueClient().getTransitions(issue.getTransitionsUri(), pm);
    final Transition startProgressTransition = getTransitionByName(transitions, "Start Progress");
    restClient.getIssueClient().transition(issue.getTransitionsUri(), new TransitionInput(startProgressTransition.getId()), pm);

    // and now let's resolve it as Incomplete
    final Transition resolveIssueTransition = getTransitionByName(transitions, "Resolve Issue");
    Collection<FieldInput> fieldInputs = Arrays.asList(new FieldInput("resolution", "Incomplete"));
    final TransitionInput transitionInput = new TransitionInput(resolveIssueTransition.getId(), fieldInputs, Comment.valueOf("My comment"));
    restClient.getIssueClient().transition(issue.getTransitionsUri(), transitionInput, pm);

  }
View Full Code Here

    final Iterable<Transition> transitions = client.getIssueClient().getTransitions(issue, pm);
    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")), new NullProgressMonitor()) ;
    final Issue transitionedIssue = client.getIssueClient().getIssue("TST-1", new NullProgressMonitor());
    assertEquals("In Progress", transitionedIssue.getStatus().getName());
    final Iterable<Transition> transitionsAfterTransition = client.getIssueClient().getTransitions(issue, pm);
    assertFalse(Iterables.contains(transitionsAfterTransition, startProgressTransition));
View Full Code Here

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

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

    final Issue resolvedIssue = client.getIssueClient().getIssue("TST-2", pm);
    final BasicResolution 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")), new NullProgressMonitor());
    final Issue changedIssue = client.getIssueClient().getIssue("TST-1", pm);
    assertTrue(changedIssue.getField(NUMERIC_CUSTOMFIELD_ID).getValue().equals(expectedValue));
  }
View Full Code Here

    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)));
    final double newValue = 123;
    final FieldInput fieldInput = new FieldInput(NUMERIC_CUSTOMFIELD_ID, newValue);
    client.getIssueClient().transition(issue, new TransitionInput(transitionFound.getId(), Arrays.asList(fieldInput),
        Comment.valueOf("My test comment")), pm);
    final Issue changedIssue = client.getIssueClient().getIssue("TST-1", pm);
    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")), pm);
      }
    });
  }
View Full Code Here

TOP

Related Classes of com.atlassian.jira.rest.client.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.