# Generated by Django 3.1.3 on 2021-03-02 14:05

import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import tcms.issuetracker.validators


class Migration(migrations.Migration):

    dependencies = [
        ('management', '0010_set_auto_now_add_on_attachment_create_date'),
        ('testruns', '0008_remove_errata_id_from_testrun'),
        ('issuetracker', '0019_auto_20181226_1411'),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='issuetracker',
            options={'verbose_name': 'Issue Tracker'},
        ),
        migrations.AlterModelOptions(
            name='productissuetrackerrelationship',
            options={'verbose_name': 'Relationship between Issue Tracker and Product'},
        ),
        migrations.AlterModelOptions(
            name='tokencredential',
            options={'verbose_name': 'Token Credential'},
        ),
        migrations.AlterModelOptions(
            name='userpwdcredential',
            options={'verbose_name': 'Username/Password Credential'},
        ),
        migrations.AlterField(
            model_name='issue',
            name='case_run',
            field=models.ForeignKey(blank=True, help_text='Optionally associate this issue to this case run.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='issues', to='testruns.testcaserun'),
        ),
        migrations.AlterField(
            model_name='issue',
            name='issue_key',
            field=models.CharField(help_text='Actual issue ID corresponding issue tracker. Different issue tracker may have issue IDs in different type or format. For example, in Bugzilla, it could be an integer, or in JIRA, it could be a string in format PROJECTNAME-number, e.g. PROJECT-1.', max_length=50, validators=[django.core.validators.MaxLengthValidator(50, 'Issue key has too many characters. 50 characters at most.')]),
        ),
        migrations.AlterField(
            model_name='issuetracker',
            name='api_url',
            field=models.URLField(blank=True, default='', help_text='API URL of this issue tracker, that is used by the corresponding service object implementation to complete specific action. A typical use case would be, a service object of a Bugzilla may use this URL to associate a case with a specific bug as an external link. Example: https://bz.example.com/xmlrpc.cgi', verbose_name='API URL'),
        ),
        migrations.AlterField(
            model_name='issuetracker',
            name='class_path',
            field=models.CharField(default='tcms.issuetracker.services.IssueTrackerService', help_text='Importable path to the implementation for this issue tracker. Default is <code>tcms.issuetracker.models.IssueTrackerService</code>, which provides basic functionalities for general purpose. Set to a custom path for specific service implementation inherited from <code>IssueTrackerService</code>', max_length=100, validators=[tcms.issuetracker.validators.validate_class_path], verbose_name='Custom service class path'),
        ),
        migrations.AlterField(
            model_name='issuetracker',
            name='credential_type',
            field=models.CharField(choices=[('NoNeed', 'No need to login'), ('UserPwd', 'Username/Password authentication'), ('Token', 'Token based')], help_text='Select a credential type. The corresponding service implementation will use it to log into the remote issue tracker service. Please remember to create a specific user/pwd or token credential if you select one of these two types.', max_length=10),
        ),
        migrations.AlterField(
            model_name='issuetracker',
            name='description',
            field=models.CharField(blank=True, default='', help_text='A short description to this issue tracker. 255 characters at most.', max_length=255),
        ),
        migrations.AlterField(
            model_name='issuetracker',
            name='enabled',
            field=models.BooleanField(db_index=True, default=True, help_text='Whether to enable this issue tracker in system wide. Default: true.'),
        ),
        migrations.AlterField(
            model_name='issuetracker',
            name='issue_report_endpoint',
            field=models.CharField(help_text='The endpoint for filing an issue. Used in the serivce implementation to construct final full URL. Example: /secure/CreateIssue!default.jspa', max_length=50, verbose_name='Issue Report Endpoint'),
        ),
        migrations.AlterField(
            model_name='issuetracker',
            name='issue_report_params',
            field=models.TextField(blank=True, default='', help_text='Parameters used to format URL for reporting issue. Each line is a <code>key:value</code> pair of parameters. Nitrate provides a few parameters to format URL and additional parameters could be provided by system administrator as well.', max_length=255, validators=[tcms.issuetracker.validators.validate_issue_report_params], verbose_name='Issue Report Parameters'),
        ),
        migrations.AlterField(
            model_name='issuetracker',
            name='issue_report_templ',
            field=models.TextField(blank=True, default='', help_text='The issue content template, which could be arbitrary text with format arguments. Nitrate provides these format arguments: <code>TestBuild.name</code>, <code>setup</code>, <code>action</code> and <code>effect</code>. The text is formatted with keyward arguments.', max_length=255, verbose_name='Issue Report Template'),
        ),
        migrations.AlterField(
            model_name='issuetracker',
            name='issue_url_fmt',
            field=models.URLField(help_text="Formatter string used to construct a specific issue's URL. Format arguments: issue_key, product. Example: https://bugzilla.domain/show_bug.cgi?id=%(issue_key)s", verbose_name='Issue URL Format'),
        ),
        migrations.AlterField(
            model_name='issuetracker',
            name='issues_display_url_fmt',
            field=models.URLField(blank=True, default='', help_text='URL format to construct a display URL used to open in Web browse to display issues. This should probably only apply to Bugzilla. Example: http://bz.example.com/buglist.cgi?bug_id={issue_keys}', verbose_name='Issues Display URL Format'),
        ),
        migrations.AlterField(
            model_name='issuetracker',
            name='name',
            field=models.CharField(help_text='Issue tracker name.', max_length=50, unique=True, validators=[django.core.validators.MaxLengthValidator(50, message='Issue tracker name is too long. 50 characters at most.'), django.core.validators.RegexValidator('^[a-zA-Z0-9 ]+$', message='Name contains invalid characters. Name could contain lower and upper case letters, digit or space.')]),
        ),
        migrations.AlterField(
            model_name='issuetracker',
            name='service_url',
            field=models.URLField(blank=True, default='', help_text='URL of this issue tracker. Example: https://issues.example.com/. The trailing slash "/" is optional.', verbose_name='Service URL'),
        ),
        migrations.AlterField(
            model_name='issuetracker',
            name='tracker_product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tracker_instances', to='issuetracker.issuetrackerproduct', verbose_name='Tracker Product'),
        ),
        migrations.AlterField(
            model_name='issuetrackerproduct',
            name='name',
            field=models.CharField(help_text='Name of the issue tracker product.', max_length=30, unique=True),
        ),
        migrations.AlterField(
            model_name='productissuetrackerrelationship',
            name='issue_tracker',
            field=models.ForeignKey(help_text='Select an issue tracker to be associated with a product.', on_delete=django.db.models.deletion.CASCADE, to='issuetracker.issuetracker'),
        ),
        migrations.AlterField(
            model_name='productissuetrackerrelationship',
            name='product',
            field=models.ForeignKey(help_text='Select which project the issue tracker is associated with.', on_delete=django.db.models.deletion.CASCADE, to='management.product'),
        ),
        migrations.AlterField(
            model_name='tokencredential',
            name='issue_tracker',
            field=models.OneToOneField(help_text='The issue tracker this credential is applied to.', on_delete=django.db.models.deletion.CASCADE, related_name='token_credential', to='issuetracker.issuetracker'),
        ),
        migrations.AlterField(
            model_name='tokencredential',
            name='secret_file',
            field=models.CharField(blank=True, help_text='An absolute path to an alternative secret file to provide the credential. The file must be in INI format.', max_length=100, null=True),
        ),
        migrations.AlterField(
            model_name='userpwdcredential',
            name='issue_tracker',
            field=models.OneToOneField(help_text='The issue tracker this credential is applied to.', on_delete=django.db.models.deletion.CASCADE, related_name='user_pwd_credential', to='issuetracker.issuetracker'),
        ),
        migrations.AlterField(
            model_name='userpwdcredential',
            name='password',
            field=models.CharField(blank=True, help_text='Password used with username together to log into remote issue tracker service.', max_length=255, null=True),
        ),
        migrations.AlterField(
            model_name='userpwdcredential',
            name='secret_file',
            field=models.CharField(blank=True, help_text='An absolute path to an alternative secret file to provide the credential. The file must be in INI format.', max_length=100, null=True),
        ),
        migrations.AlterField(
            model_name='userpwdcredential',
            name='username',
            field=models.CharField(blank=True, help_text='Username used to log into remote issue tracker service.', max_length=100, null=True),
        ),
    ]
