format tickets in Tickets.vue
This commit is contained in:
parent
6dad675d1e
commit
3a5f35fa5d
7 changed files with 79 additions and 8 deletions
|
@ -102,11 +102,12 @@ class LMTPHandlerTestCase(TestCase): # TODO replace with less hacky test
|
|||
self.assertTrue(Email.objects.all()[1].reference.endswith("@localhost>"))
|
||||
self.assertEqual("<1@test>", Email.objects.all()[1].in_reply_to)
|
||||
self.assertEqual('test', IssueThread.objects.all()[0].name)
|
||||
#self.assertEqual('pending_new', IssueThread.objects.all()[0].state)
|
||||
self.assertEqual('pending_new', IssueThread.objects.all()[0].state)
|
||||
self.assertEqual(None, IssueThread.objects.all()[0].assigned_to)
|
||||
states = StateChange.objects.filter(issue_thread=IssueThread.objects.all()[0])
|
||||
self.assertEqual(1, len(states))
|
||||
self.assertEqual('pending_new', states[0].state)
|
||||
|
||||
def test_handle_quoted_printable(self):
|
||||
from aiosmtpd.smtp import Envelope
|
||||
from asgiref.sync import async_to_sync
|
||||
|
@ -295,8 +296,8 @@ class LMTPHandlerTestCase(TestCase): # TODO replace with less hacky test
|
|||
self.assertEqual("<1@test>", Email.objects.all()[1].in_reply_to)
|
||||
self.assertEqual('test', IssueThread.objects.all()[0].name)
|
||||
self.assertEqual(None, IssueThread.objects.all()[0].assigned_to)
|
||||
self.assertEqual(1, len(IssueThread.objects.all()))
|
||||
self.assertEqual('pending_new', IssueThread.objects.all()[0].state)
|
||||
states = StateChange.objects.filter(issue_thread=IssueThread.objects.all()[0])
|
||||
self.assertEqual(1, len(states))
|
||||
self.assertEqual('pending_new', states[0].state)
|
||||
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ class IssueSerializer(serializers.ModelSerializer):
|
|||
if attrs['state'] not in [x[0] for x in STATE_CHOICES]:
|
||||
raise serializers.ValidationError('invalid state')
|
||||
return attrs
|
||||
|
||||
@staticmethod
|
||||
def get_timeline(obj):
|
||||
timeline = []
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
# Generated by Django 4.2.7 on 2023-12-29 22:21
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('tickets', '0003_alter_issuethread_state'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='issuethread',
|
||||
name='state',
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='statechange',
|
||||
name='state',
|
||||
field=models.CharField(choices=[('pending_new', 'New'), ('pending_open', 'Open'), ('pending_shipping', 'Needs to be shipped'), ('pending_physical_confirmation', 'Needs to be confirmed physically'), ('pending_return', 'Needs to be returned'), ('waiting_details', 'Waiting for details'), ('waiting_pre_shipping', 'Waiting for Address/Shipping Info'), ('closed_returned', 'Closed: Returned'), ('closed_shipped', 'Closed: Shipped'), ('closed_not_found', 'Closed: Not found'), ('closed_not_our_problem', 'Closed: Not our problem'), ('closed_duplicate', 'Closed: Duplicate'), ('closed_timeout', 'Closed: Timeout'), ('closed_spam', 'Closed: Spam')], default='pending_new', max_length=255),
|
||||
),
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue