diff --git a/opentech/apply/funds/forms.py b/opentech/apply/funds/forms.py index 192dbfba3acbefeaf36d0856b78bbdaf62a2d34e..91911a9858bf01e30272c27b1c3e7cb1791dfcc2 100644 --- a/opentech/apply/funds/forms.py +++ b/opentech/apply/funds/forms.py @@ -27,6 +27,9 @@ class ProgressSubmissionForm(forms.ModelForm): self.user = kwargs.pop('user') super().__init__(*args, **kwargs) choices = list(self.instance.get_actions_for_user(self.user)) + # Sort the transitions by the order they are listed. + sort_by = list(self.instance.phase.transitions.keys()) + choices.sort(key=lambda k: sort_by.index(k[0])) action_field = self.fields['action'] action_field.choices = choices self.should_show = bool(choices)