コード例 #1
0
  // JRA-14164: ensure that when processing multiple issues with the one tag, that the assignee is
  // not overwritten accidentally
  public void testDoTagValidFilterId() throws Exception {
    final String scriptFilename = "transition-workflow.test.valid.filter.id-action.jelly";

    runScript(scriptFilename);

    MutableIssue issue1 = ComponentAccessor.getIssueManager().getIssueObject("ABC-2");
    MutableIssue issue2 = ComponentAccessor.getIssueManager().getIssueObject("ABC-3");

    assertEquals(user, issue1.getAssignee());
    assertEquals(secondaryUser, issue2.getAssignee());
  }
コード例 #2
0
  // JRA-19763
  public void testDoTagNotLoggedInUser() throws Exception {
    final String scriptFilename =
        "transition-workflow.test.valid.action.name-action-differentuser.jelly";
    runScript(scriptFilename);

    MutableIssue issue1 = ComponentAccessor.getIssueManager().getIssueObject("ABC-2");
    assertEquals(user, issue1.getAssignee());
    assertAuthor(secondaryUser, issue1);
  }
コード例 #3
0
  // This is the positive test that shows the tag actually works
  public void testDoTagValidActionName() throws Exception {

    final String scriptFilename = "transition-workflow.test.valid.action.name-action.jelly";

    try {
      runScript(scriptFilename);
    } catch (JellyServiceException e) {
      fail("JellyTagException should not have been thrown.");
    }

    MutableIssue issue1 = ComponentAccessor.getIssueManager().getIssueObject("ABC-2");
    assertEquals(user, issue1.getAssignee());
    assertAuthor(user, issue1);
  }