@Test public void test_automatic_transition() { Transition transition = Transition.builder("close") .from("OPEN").to("CLOSED") .automatic() .build(); assertThat(transition.automatic()).isTrue(); } }
.conditions(IsBeingClosed.INSTANCE) .functions(SetClosed.INSTANCE, new SetCloseDate(true)) .automatic() .build()) .transition(Transition.builder(AUTOMATIC_CLOSE_TRANSITION) .conditions(IsBeingClosed.INSTANCE) .functions(SetClosed.INSTANCE, new SetCloseDate(true)) .automatic() .build()) .transition(Transition.builder(AUTOMATIC_CLOSE_TRANSITION) .conditions(IsBeingClosed.INSTANCE) .functions(SetClosed.INSTANCE, new SetCloseDate(true)) .automatic() .build()) .transition(Transition.builder(AUTOMATIC_CLOSE_TRANSITION) .conditions(IsBeingClosed.INSTANCE) .functions(SetClosed.INSTANCE, new SetCloseDate(true)) .automatic() .build()) .conditions(new NotCondition(IsBeingClosed.INSTANCE), new HasResolution(Issue.RESOLUTION_FIXED)) .functions(new SetResolution(null), new SetCloseDate(false)) .automatic() .build());
.conditions(IsBeingClosed.INSTANCE) .functions(SetClosed.INSTANCE, SetCloseDate.INSTANCE) .automatic() .build()) .transition(Transition.builder(AUTOMATIC_CLOSE_TRANSITION) .conditions(IsBeingClosed.INSTANCE) .functions(SetClosed.INSTANCE, SetCloseDate.INSTANCE) .automatic() .build()) .transition(Transition.builder(AUTOMATIC_CLOSE_TRANSITION) .conditions(IsBeingClosed.INSTANCE) .functions(SetClosed.INSTANCE, SetCloseDate.INSTANCE) .automatic() .build()) .transition(Transition.builder(AUTOMATIC_CLOSE_TRANSITION) .conditions(IsBeingClosed.INSTANCE) .functions(SetClosed.INSTANCE, SetCloseDate.INSTANCE) .automatic() .build()) .conditions(new NotCondition(IsBeingClosed.INSTANCE), new HasResolution(Issue.RESOLUTION_FIXED), IsNotHotspotNorManualVulnerability.INSTANCE) .functions(new SetResolution(null), UnsetCloseDate.INSTANCE) .automatic() .build()) IsNotHotspotNorManualVulnerability.INSTANCE)