diff --git a/pagure/forms.py b/pagure/forms.py index c0a1f25..7a520d1 100644 --- a/pagure/forms.py +++ b/pagure/forms.py @@ -189,6 +189,11 @@ class UpdateIssueForm(wtf.Form): [wtforms.validators.Optional()], choices=[(item, item) for item in []] ) + priority = wtforms.SelectField( + 'Priority', + [wtforms.validators.Optional()], + choices=[(item, item) for item in []] + ) def __init__(self, *args, **kwargs): """ Calls the default constructor with the normal argument but @@ -201,6 +206,11 @@ class UpdateIssueForm(wtf.Form): (status, status) for status in kwargs['status'] ] + if 'priorities' in kwargs: + self.priority.choices = [ + (key, val) for key, val in kwargs['priorities'].iteritems() + ] + class AddPullRequestCommentForm(wtf.Form): ''' Form to add a comment to a pull-request. '''