Possibility to define description for release notes (#77825)
gitea/scrutiny/pipeline/head This commit looks good Details

This commit is contained in:
Lauréline Guérin 2023-05-25 22:10:55 +02:00
parent 3298e26851
commit 5fb1b91ca1
No known key found for this signature in database
GPG Key ID: 1FAB9B9B4F93D473
5 changed files with 24 additions and 4 deletions

View File

@ -9,4 +9,5 @@ class IssueInfoForm(forms.ModelForm):
fields = [
'issue_type',
'doc_focus',
'wording',
]

View File

@ -0,0 +1,15 @@
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('projects', '0006_issue_info'),
]
operations = [
migrations.AddField(
model_name='issueinfo',
name='wording',
field=models.TextField(blank=True, verbose_name='Description pour les notes de mise à jour'),
),
]

View File

@ -219,3 +219,4 @@ class IssueInfo(models.Model):
issue_id = models.IntegerField()
issue_type = models.CharField('Type de ticket', max_length=10, choices=ISSUE_TYPES, null=True)
doc_focus = models.BooleanField('Attention à porter à la doc (la mettre à jour ?)', default=False)
wording = models.TextField('Description pour les notes de mise à jour', blank=True)

View File

@ -6,7 +6,7 @@
{% spaceless %}
{% for issue in issues %}
{% if issue.info.issue_type == 'NEW' %}
<li>{{ issue.subject }} (<a href="{{ issue.url }}">#{{ issue.id }}</a>)</li>
<li>{% if issue.info.wording %}{{ issue.info.wording }}{% else %}{{ issue.subject }} (<a href="{{ issue.url }}">#{{ issue.id }}</a>){% endif %}</li>
{% endif %}
{% endfor %}
{% endspaceless %}
@ -18,7 +18,7 @@
{% spaceless %}
{% for issue in issues %}
{% if issue.info.issue_type == 'BUGFIX' %}
<li>{{ issue.subject }} (<a href="{{ issue.url }}">#{{ issue.id }}</a>)</li>
<li>{% if issue.info.wording %}{{ issue.info.wording }}{% else %}{{ issue.subject }} (<a href="{{ issue.url }}">#{{ issue.id }}</a>){% endif %}</li>
{% endif %}
{% endfor %}
{% endspaceless %}
@ -30,7 +30,7 @@
{% spaceless %}
{% for issue in issues %}
{% if issue.info.issue_type == 'DEV' %}
<li>{{ issue.subject }} (<a href="{{ issue.url }}">#{{ issue.id }}</a>)</li>
<li>{% if issue.info.wording %}{{ issue.info.wording }}{% else %}{{ issue.subject }} (<a href="{{ issue.url }}">#{{ issue.id }}</a>){% endif %}</li>
{% endif %}
{% endfor %}
{% endspaceless %}

View File

@ -9,7 +9,10 @@
{{ issue.info.issue_type }}
</td>
<td class="issue"><a href="{{ issue.url }}">#{{ issue.id }}</a></td>
<td class="subject">{{ issue.subject }}</td>
<td class="subject">
{{ issue.subject }}
{% if issue.info.wording %}<br /><i>{{ issue.info.wording }}</i>{% endif %}
</td>
<td class="modules">
<span class="modules">[&nbsp;{% for module in issue.modules.keys %}{{ module }}{% if not forloop.last %},&nbsp;{% endif %}{% endfor %}&nbsp;]</span>
</td>