fix: ticket status filter fields (#16646)

This commit is contained in:
fit2bot
2026-03-03 16:28:13 +08:00
committed by GitHub
parent 5c13d95c33
commit b028fec6d1
12 changed files with 6468 additions and 3906 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -15,28 +15,28 @@ class TicketType(TextChoices):
class TicketState(TextChoices):
all = 'all', _('All')
pending = 'pending', _('Open')
closed = 'closed', _("Cancel")
approved = 'approved', _('Approved')
rejected = 'rejected', _('Rejected')
pending = 'pending', _('Ticket open')
closed = 'closed', _("Ticket closed")
approved = 'approved', _('Ticket approved')
rejected = 'rejected', _('Ticket rejected')
class TicketStatus(TextChoices):
open = 'open', _("Open")
closed = 'closed', _("Finished")
open = 'open', _("Ticket open")
closed = 'closed', _("Ticket finished")
class StepState(TextChoices):
pending = 'pending', _('Pending')
closed = 'closed', _("Closed")
approved = 'approved', _('Approved')
rejected = 'rejected', _('Rejected')
pending = 'pending', _('Step pending')
closed = 'closed', _("Step closed")
approved = 'approved', _('Step approved')
rejected = 'rejected', _('Step rejected')
class StepStatus(TextChoices):
active = 'active', _('Active')
closed = 'closed', _("Closed")
pending = 'pending', _('Pending')
active = 'active', _('Step active')
closed = 'closed', _("Step closed")
pending = 'pending', _('Step pending')
class TicketAction(TextChoices):

View File

@@ -21,7 +21,7 @@ class TicketFilter(BaseFilterSet):
class Meta:
model = Ticket
fields = (
'id', 'title', 'type', 'state',
'id', 'title', 'type', 'state', 'status',
'applicant', 'assignees__id', 'org_name', 'org_id'
)

View File

@@ -18,7 +18,7 @@ __all__ = [
class TicketSerializer(OrgResourceModelSerializerMixin):
type = LabeledChoiceField(choices=TicketType.choices, read_only=True, label=_('Type'))
status = LabeledChoiceField(choices=TicketStatus.choices, read_only=True, label=_('Status'))
state = LabeledChoiceField(choices=TicketState.choices, read_only=True, label=_("Status"))
state = LabeledChoiceField(choices=TicketState.choices, read_only=True, label=_("State"))
process_map = serializers.JSONField(read_only=True, default=list, label=_('Process map'))
class Meta: