diff --git a/scrutiny/projects/templates/projects/issue_fragment.html b/scrutiny/projects/templates/projects/issue_fragment.html index ea24e9b..93a0094 100644 --- a/scrutiny/projects/templates/projects/issue_fragment.html +++ b/scrutiny/projects/templates/projects/issue_fragment.html @@ -6,7 +6,7 @@ {% if issue.info.doc_focus %}{% endif %} - {{ issue.info.issue_type }} + {{ issue.info.issue_type|default:"" }} #{{ issue.id }} diff --git a/scrutiny/projects/templates/projects/issue_info_form.html b/scrutiny/projects/templates/projects/issue_info_form.html index 96a46a9..5da1544 100644 --- a/scrutiny/projects/templates/projects/issue_info_form.html +++ b/scrutiny/projects/templates/projects/issue_info_form.html @@ -1,13 +1,15 @@ {% extends "scrutiny/base.html" %} +{% load gadjo %} {% block appbar %} -

Infos du ticket #{{ form.instance.issue_id }}

+

Infos du ticket #{{ issue.id }}

{% endblock %} {% block content %}
+

{{ issue.url }}

{% csrf_token %} - {{ form.as_p }} + {{ form|with_template }}
Annuler diff --git a/scrutiny/projects/views.py b/scrutiny/projects/views.py index 418b957..bb2bdbf 100644 --- a/scrutiny/projects/views.py +++ b/scrutiny/projects/views.py @@ -361,6 +361,10 @@ class IssueInfoUpdate(FormView): self.issue = Issue(kwargs['issue_id']) return super().dispatch(request, *args, **kwargs) + def get_context_data(self, **kwargs): + kwargs['issue'] = self.issue + return super().get_context_data(**kwargs) + def get_form_kwargs(self): info, created = IssueInfo.objects.get_or_create(issue_id=self.issue.id) kwargs = super().get_form_kwargs()