-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Labels
Description
Function can($subject, $transitionName) in Workflow.php need to returns true if the transition is enabled,
but getTransitionForSubject return only the first transition in transitions that is valid for the object.
And in the example below the only valid transition is "feedback". The other two "review" and "close" are missing. If the initial place is "opened".
Example:
framework:
workflows:
pull_request:
marking_store:
type: single_state
arguments:
- marking
supports:
- AppBundle\Entity\PullRequest
places:
- opened
- closed
- needs_review
- reviewed
- merged
initial_place: opened
transitions:
feedback:
from: opened
to: needs_review
review:
from: [opened, needs_review]
to: reviewed
merge:
from: reviewed
to: merged
close:
from: [opened, needs_review, reviewed]
to: closed