Skip to content

Commit 2f60528

Browse files
Update verbose name + help text for JIRA username and password fields (#12261)
* Update verbose name + help text for JIRA password field * Update verbose name + help text for JIRA password field
1 parent ceee1cf commit 2f60528

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Generated by Django 5.1.8 on 2025-04-27 06:37
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('dojo', '0227_migrate_tags'),
10+
]
11+
12+
operations = [
13+
migrations.AlterField(
14+
model_name='jira_instance',
15+
name='password',
16+
field=models.CharField(help_text='Password, API Token, or Personal Access Token, see DefectDojo documentation for more information.', max_length=2000, verbose_name='Password/Token'),
17+
),
18+
migrations.AlterField(
19+
model_name='jira_instance',
20+
name='username',
21+
field=models.CharField(help_text='Username or Email Address, see DefectDojo documentation for more information.', max_length=2000, verbose_name='Username/Email'),
22+
),
23+
]

dojo/forms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2490,7 +2490,7 @@ class Meta:
24902490

24912491

24922492
class BaseJiraForm(forms.ModelForm):
2493-
password = forms.CharField(widget=forms.PasswordInput, required=True)
2493+
password = forms.CharField(widget=forms.PasswordInput, required=True, help_text=JIRA_Instance._meta.get_field("password").help_text, label=JIRA_Instance._meta.get_field("password").verbose_name)
24942494

24952495
def test_jira_connection(self):
24962496
import dojo.jira_link.helper as jira_helper

dojo/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3849,8 +3849,8 @@ def __str__(self):
38493849
class JIRA_Instance(models.Model):
38503850
configuration_name = models.CharField(max_length=2000, help_text=_("Enter a name to give to this configuration"), default="")
38513851
url = models.URLField(max_length=2000, verbose_name=_("JIRA URL"), help_text=_("For more information how to configure Jira, read the DefectDojo documentation."))
3852-
username = models.CharField(max_length=2000)
3853-
password = models.CharField(max_length=2000)
3852+
username = models.CharField(max_length=2000, verbose_name=_("Username/Email"), help_text=_("Username or Email Address, see DefectDojo documentation for more information."))
3853+
password = models.CharField(max_length=2000, verbose_name=_("Password/Token"), help_text=_("Password, API Token, or Personal Access Token, see DefectDojo documentation for more information."))
38543854

38553855
if hasattr(settings, "JIRA_ISSUE_TYPE_CHOICES_CONFIG"):
38563856
default_issue_type_choices = settings.JIRA_ISSUE_TYPE_CHOICES_CONFIG

0 commit comments

Comments
 (0)