mirror of
https://github.com/jumpserver/jumpserver.git
synced 2026-03-18 19:12:07 +00:00
fix: ticket status filter fields (#16646)
This commit is contained in:
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
@@ -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):
|
||||
|
||||
@@ -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'
|
||||
)
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user