mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-25 09:23:39 +01:00
Add merged_to information to ticket
This commit is contained in:
parent
79d8046694
commit
9795167d9b
19
helpdesk/migrations/0033_ticket_merged_to.py
Normal file
19
helpdesk/migrations/0033_ticket_merged_to.py
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Generated by Django 2.2.13 on 2020-10-27 17:14
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('helpdesk', '0032_kbitem_enabled'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='ticket',
|
||||||
|
name='merged_to',
|
||||||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='merged_tickets', to='helpdesk.Ticket', verbose_name='merged to'),
|
||||||
|
),
|
||||||
|
]
|
@ -569,6 +569,15 @@ class Ticket(models.Model):
|
|||||||
verbose_name=_('Knowledge base item the user was viewing when they created this ticket.'),
|
verbose_name=_('Knowledge base item the user was viewing when they created this ticket.'),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
merged_to = models.ForeignKey(
|
||||||
|
'self',
|
||||||
|
verbose_name=_('merged to'),
|
||||||
|
related_name='merged_tickets',
|
||||||
|
on_delete=models.CASCADE,
|
||||||
|
null=True,
|
||||||
|
blank=True
|
||||||
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def time_spent(self):
|
def time_spent(self):
|
||||||
"""Return back total time spent on the ticket. This is calculated value
|
"""Return back total time spent on the ticket. This is calculated value
|
||||||
|
Loading…
Reference in New Issue
Block a user