diff --git a/admin.py b/admin.py index a7dae0b3..6716dbe8 100644 --- a/admin.py +++ b/admin.py @@ -20,6 +20,10 @@ class AttachmentInline(admin.StackedInline): class FollowUpAdmin(admin.ModelAdmin): inlines = [TicketChangeInline, AttachmentInline] +class KBItemAdmin(admin.ModelAdmin): + list_display = ('category', 'title', 'last_updated',) + list_display_links = ('title') + admin.site.register(Ticket, TicketAdmin) admin.site.register(Queue, QueueAdmin) admin.site.register(FollowUp, FollowUpAdmin) @@ -27,4 +31,4 @@ admin.site.register(PreSetReply) admin.site.register(EscalationExclusion) admin.site.register(EmailTemplate) admin.site.register(KBCategory) -admin.site.register(KBItem) +admin.site.register(KBItem, KBItemAdmin) diff --git a/fixtures/initial_data.json b/fixtures/initial_data.json index 37b528f1..2389b4af 100644 --- a/fixtures/initial_data.json +++ b/fixtures/initial_data.json @@ -1 +1 @@ -[{"pk": "1", "model": "helpdesk.emailtemplate", "fields": {"template_name": "assigned_cc", "html": "
Hello,<\/p>\n\n
This is a courtesy e-mail to let you know that ticket {{ ticket.ticket }}<\/b><\/a> ({{ ticket.title }}<\/em>) has been {% if ticket.assigned_to %}assigned to {{ ticket.assigned_to %}{% else %}unassigned{% endif %}.<\/p>", "plain_text": "Hello,\n\nThis is a courtesy e-mail to let you know that ticket {{ ticket.ticket }} (\"{{ ticket.title }}\") has been {% if ticket.assigned_to %}assigned to {{ ticket.assigned_to }}{% else %}unassigned{% endif %}\n\nYou can view this online at {{ ticket.staff_url }}.", "heading": "Ticket Assigned", "subject": "(Assigned)"}}, {"pk": "2", "model": "helpdesk.emailtemplate", "fields": {"template_name": "assigned_owner", "html": " Hello,<\/p>\n\n\n This is a courtesy e-mail to let you know that a ticket has been assigned to you.<\/p>\n\n {% if ticket.submitter_email %}The ticket was submitted by {{ ticket.submitter_email }}, and the subject{% else %}The ticket subject{% endif%} is {{ ticket.title }}<\/i>.<\/p>\n\n The ticket ID is {{ ticket.ticket }}<\/a><\/b>. It\"s priority is {{ ticket.get_priority_display }}.<\/p>", "plain_text": "Hello,\n\nThis is a courtesy e-mail to let you know that a ticket has been assigned to you.\n\n{% if ticket.submitter_email %}The ticket was submitted by {{ ticket.submitter_email }}, and the subject{% else %}The ticket subject{% endif%} is {{ ticket.title }}.\n\nThe ticket ID is {{ ticket.ticket }}, you can view it online at {{ ticket.staff_url }}. It\"s priority is {{ ticket.get_priority_display }}.", "heading": "Ticket Assigned To You", "subject": "(Assigned)"}}, {"pk": "3", "model": "helpdesk.emailtemplate", "fields": {"template_name": "closed_cc", "html": " Hello,<\/p>\n\n Ticket {{ ticket.title }}<\/i> ('{{ ticket.title }}') has been closed.<\/p>\n\n If you wish to view this ticket online, you can visit {{ ticket.get_staff_url }}<\/a>.<\/p>", "plain_text": "Hello,\n\nTicket {{ ticket.title }} (\"{{ ticket.title }}\") has been closed.\n\nIf you wish to view this ticket online, you can visit {{ ticket.get_staff_url }}.", "heading": "Ticket Closed", "subject": "(Closed)"}}, {"pk": "4", "model": "helpdesk.emailtemplate", "fields": {"template_name": "closed_owner", "html": " Hello,<\/p>\n\n A ticket currently assigned to you with a subject of {{ ticket.title }}<\/i> has been closed.<\/p>\n\n If you wish to view this ticket online, you can visit {{ ticket.get_staff_url }}<\/a>.<\/p>", "plain_text": "Hello,\n\nA ticket currently assigned to you with a subject of \"{{ ticket.title }}\" has been closed.\n\nIf you wish to view this ticket online, you can visit {{ ticket.get_staff_url }}.", "heading": "Ticket Closed", "subject": "(Closed)"}}, {"pk": "5", "model": "helpdesk.emailtemplate", "fields": {"template_name": "closed_submitter", "html": " Hello,<\/p>\n\n You recently logged a ticket with a subject of {{ ticket.title }}<\/i> with us. This e-mail is to confirm that this ticket has been closed.<\/p>\n\n If you believe that further work is required on this ticket, please let us know by replying to this e-mail and keeping the subject intact.<\/p>\n\n If you wish to view this ticket online, you can visit {{ ticket.get_ticket_url }}<\/a>.<\/p>", "plain_text": "Hello,\n\nYou recently logged a ticket with a subject of \"{{ ticket.title }}\" with us. This e-mail is to confirm that this ticket has been closed.\n\nIf you believe that further work is required on this ticket, please let us know by replying to this e-mail and keeping the subject intact.\n\nIf you wish to view this ticket online, you can visit {{ ticket.get_ticket_url }}.", "heading": "Ticket Closed", "subject": "(Closed)"}}, {"pk": "6", "model": "helpdesk.emailtemplate", "fields": {"template_name": "escalated_cc", "html": " Hello,<\/p>\n\n This is a courtesy e-mail to let you know that ticket {{ ticket.ticket }}<\/b><\/a> ({{ ticket.title }}<\/em>) has been escalated automatically.<\/p>", "plain_text": "Hello,\n\nThis is a courtesy e-mail to let you know that ticket {{ ticket.ticket }} (\"{{ ticket.title }}\") has been escalated automatically.\n\nYou can view this online at {{ ticket.staff_url }}.", "heading": "Ticket Escalated", "subject": "(Escalated)"}}, {"pk": "8", "model": "helpdesk.emailtemplate", "fields": {"template_name": "escalated_owner", "html": " Hello,<\/p>\n\n A ticket currently assigned to you with a subject of {{ ticket.title }}<\/i> has been automatically escalated.<\/p>\n\n Please review this ticket and attempt to provide a resolution as soon as possible.<\/p>\n\n If you wish to view this ticket online, you can visit {{ ticket.get_staff_url }}<\/a>.<\/p>", "plain_text": "Hello,\n\nA ticket currently assigned to you with a subject of \"{{ ticket.title }}\" has been automatically escalated.\n\nPlease review this ticket and attempt to provide a resolution as soon as possible.\n\nIf you wish to view this ticket online, you can visit {{ ticket.get_staff_url }}.", "heading": "Ticket Assigned to You Has Been Escalated", "subject": "(Escalated)"}}, {"pk": "7", "model": "helpdesk.emailtemplate", "fields": {"template_name": "escalated_submitter", "html": " Hello,<\/p>\n\n You recently logged a ticket with a subject of {{ ticket.title }}<\/i> with us. This e-mail is to advise you of an automated escalation of that ticket.<\/p>\n\n We will review your ticket shortly and attempt to provide a resolution as soon as possible.<\/p>\n\n If you wish to view this ticket online, you can visit {{ ticket.get_ticket_url }}<\/a>.<\/p>", "plain_text": "Hello,\n\nYou recently logged a ticket with a subject of \"{{ ticket.title }}\" with us. This e-mail is to advise you of an automated escalation of that ticket.\n\nWe will review your ticket shortly and attempt to provide a resolution as soon as possible.\n\nIf you wish to view this ticket online, you can visit {{ ticket.get_ticket_url }}.", "heading": "Your Ticket Has Been Escalated", "subject": "(Escalated)"}}, {"pk": "9", "model": "helpdesk.emailtemplate", "fields": {"template_name": "newticket_cc", "html": " Hello,<\/p>\n\n This is a courtesy e-mail to let you know that ticket {{ ticket.ticket }}<\/b><\/a> ({{ ticket.title }}<\/em>) has been opened.<\/p>", "plain_text": "Hello,\n\nThis is a courtesy e-mail to let you know that ticket {{ ticket.ticket }} (\"{{ ticket.title }}\") has been opened.\n\nYou can view this online at {{ ticket.staff_url }}.", "heading": "New Ticket Opened", "subject": "(Opened)"}}, {"pk": "10", "model": "helpdesk.emailtemplate", "fields": {"template_name": "newticket_submitter", "html": " Hello,<\/p>\n\n\n This is a courtesy e-mail to let you know that we have received your helpdesk query with a subject of {{ ticket.title }}<\/i>. <\/p>\n\n You do not have to do anything further at this stage. Your ticket has been assigned a number of {{ ticket.ticket }}<\/b>.<\/p>\n\n If you wish to send us further details, or if you have any queries about this ticket, please include the ticket id of {{ ticket.ticket }}<\/b> in the subject. The easiest way to do this is just press \"reply\" to this message.<\/p>\n\n If you wish to view this ticket online, you can visit {{ ticket.get_ticket_url }}<\/a>.<\/p>\n\n We will investigate your query and attempt to resolve it as soon as possible. You will receive further updates and a resolution via this e-mail address.<\/p>", "plain_text": "Hello,\n\nThis is a courtesy e-mail to let you know that we have received your helpdesk query with a subject of {{ ticket.title }}. \n\nYou do not have to do anything further at this stage. Your ticket has been assigned a number of {{ ticket.ticket }}.\n\nIf you wish to send us further details, or if you have any queries about this ticket, please include the ticket id of {{ ticket.ticket }} in the subject. The easiest way to do this is just press \"reply\" to this message.\n\nIf you wish to view this ticket online, you can visit {{ ticket.get_ticket_url }}.\n\nWe will investigate your query and attempt to resolve it as soon as possible. You will receive further updates and a resolution via this e-mail address.", "heading": "Your Ticket Has Been Opened", "subject": "(Opened)"}}, {"pk": "11", "model": "helpdesk.emailtemplate", "fields": {"template_name": "resolved_cc", "html": " Hello,<\/p>\n\n Ticket {{ ticket.ticket }} ({{ ticket.title }}<\/i>) has been resolved.<\/p>\n\n The following resolution was added:<\/p>\n\n This resolution has been e-mailed to the submitter, who will verify it before you can close this ticket.<\/p>\n\n If you wish to view this ticket online, you can visit {{ ticket.get_staff_url }}<\/a>.<\/p>", "plain_text": "Hello,\n\nTicket {{ ticket.ticket }} ({{ ticket.title }}) has been resolved.\n\nThe following resolution was added:\n\n{{ resolution }}\n\nThis resolution has been e-mailed to the submitter, who will verify it before you can close this ticket.\n\nIf you wish to view this ticket online, you can visit {{ ticket.get_staff_url }}.", "heading": "Ticket Resolved", "subject": "(Resolved)"}}, {"pk": "12", "model": "helpdesk.emailtemplate", "fields": {"template_name": "resolved_owner", "html": " Hello,<\/p>\n\n A ticket currently assigned to you with a subject of {{ ticket.title }}<\/i> has had a resolution added.<\/p>\n\n The following resolution was added to ticket {{ ticket.ticket }}<\/b>:<\/p>\n\n This resolution has been e-mailed to the submitter, who will verify it before you can close this ticket.<\/p>\n\n If you wish to view this ticket online, you can visit {{ ticket.get_staff_url }}<\/a>.<\/p>", "plain_text": "Hello,\n\nA ticket currently assigned to you with a subject of {{ ticket.title }} has had a resolution added.\n\nThe following resolution was added to ticket {{ ticket.ticket }}:\n\n{{ resolution }}\n\nThis resolution has been e-mailed to the submitter, who will verify it before you can close this ticket.\n\nIf you wish to view this ticket online, you can visit {{ ticket.get_staff_url }}.", "heading": "Ticket Resolved", "subject": "(Resolved)"}}, {"pk": "13", "model": "helpdesk.emailtemplate", "fields": {"template_name": "resolved_submitter", "html": " Hello,<\/p>\n\n You recently logged a ticket with a subject of {{ ticket.title }}<\/i> with us. This e-mail is to advise you of a resolution to that ticket.<\/p>\n\n The following resolution was added to ticket {{ ticket.ticket }}<\/b>:<\/p>\n\n Can you please confirm that this resolution addresses your needs so we may close this ticket? If you have any further queries, or if you do not believe this resolution is adequate, please reply to this e-mail and keep the subject intact.<\/p>\n\n If you wish to view this ticket online, you can visit {{ ticket.get_ticket_url }}<\/a>.<\/p>", "plain_text": "Hello,\n\nYou recently logged a ticket with a subject of \"{{ ticket.title }}\" with us. This e-mail is to advise you of a resolution to that ticket.\n\nThe following resolution was added to ticket {{ ticket.ticket }}:\n\n{{ resolution }}\n\nCan you please confirm that this resolution addresses your needs so we may close this ticket? If you have any further queries, or if you do not believe this resolution is adequate, please reply to this e-mail and keep the subject intact.\n\nIf you wish to view this ticket online, you can visit {{ ticket.get_ticket_url }}.", "heading": "Your Ticket Has Been Resolved", "subject": "(Resolved)"}}, {"pk": "14", "model": "helpdesk.emailtemplate", "fields": {"template_name": "updated_cc", "html": " Hello,<\/p>\n\n Ticket {{ ticket.ticket }}<\/a> ({{ ticket.title }}<\/em>) has been updated.<\/p>\n\n The following comment was added:<\/p>\n\n This information has {% if private %}not {% endif %} been e-mailed to the submitter.<\/p>\n\n If you wish to view this ticket online, you can visit {{ ticket.staff_url }}<\/a>.<\/p>", "plain_text": "Hello,\n\nTicket {{ ticket.ticket }} ({{ ticket.title }}) has been updated.\n\nThe following comment was added:\n\n{{ comment }}\n\nThis information has {% if private %}not {% endif %} been e-mailed to the submitter.\n\nIf you wish to view this ticket online, you can visit {{ ticket.staff_url }}.", "heading": "Ticket Updated", "subject": "(Updated)"}}, {"pk": "15", "model": "helpdesk.emailtemplate", "fields": {"template_name": "updated_owner", "html": " Hello,<\/p>\n\n Ticket {{ ticket.ticket }}<\/a> ({{ ticket.title }}<\/em>), which is assigned to you, has been updated.<\/p>\n\n The following comment was added to ticket {{ ticket.ticket }}<\/b>:<\/p>\n\n This information has {% if private %}not {% endif %} been e-mailed to the submitter.<\/p>\n\n If you wish to view this ticket online, you can visit {{ ticket.staff_url }}<\/a>.<\/p>", "plain_text": "Hello,\n\nTicket {{ ticket.ticket }} ({{ ticket.title }}), which is assigned to you, has been updated.\n\nThe following comment was added to ticket {{ ticket.ticket }}:\n\n{{ comment }}\n\nThis information has {% if private %}not {% endif %} been e-mailed to the submitter.\n\nIf you wish to view this ticket online, you can visit {{ ticket.staff_url }}.", "heading": "Ticket Updated", "subject": "(Updated)"}}, {"pk": "16", "model": "helpdesk.emailtemplate", "fields": {"template_name": "updated_submitter", "html": " Hello,<\/p>\n\n You recently logged a ticket with a subject of {{ ticket.title }}<\/i> with us. This e-mail is to advise you of an update to that ticket.<\/p>\n\n The following comment was added to ticket {{ ticket.ticket }}<\/b>:<\/p>\n\n To provide us with further information, please reply to this e-mail.<\/p>\n\n If you wish to view this ticket online, you can visit {{ ticket.get_ticket_url }}<\/a>.<\/p>", "plain_text": "Hello,\n\nYou recently logged a ticket with a subject of \"{{ ticket.title }}\" with us. This e-mail is to advise you of an update to that ticket.\n\nThe following comment was added to ticket {{ ticket.ticket }}:\n\n{{ comment }}\n\nTo provide us with further information, please reply to this e-mail.\n\nIf you wish to view this ticket online, you can visit {{ ticket.get_ticket_url }}.", "heading": "Your Ticket Has Been Updated", "subject": "(Updated)"}}]
+[{"pk": "1", "model": "helpdesk.emailtemplate", "fields": {"template_name": "assigned_cc", "html": " Hello,<\/p>\n\n This is a courtesy e-mail to let you know that ticket {{ ticket.ticket }}<\/b><\/a> ({{ ticket.title }}<\/em>) has been {% if ticket.assigned_to %}assigned to {{ ticket.assigned_to }}{% else %}unassigned{% endif %}.<\/p>", "plain_text": "Hello,\n\nThis is a courtesy e-mail to let you know that ticket {{ ticket.ticket }} (\"{{ ticket.title }}\") has been {% if ticket.assigned_to %}assigned to {{ ticket.assigned_to }}{% else %}unassigned{% endif %}\n\nYou can view this online at {{ ticket.staff_url }}.", "heading": "Ticket Assigned", "subject": "(Assigned)"}}, {"pk": "2", "model": "helpdesk.emailtemplate", "fields": {"template_name": "assigned_owner", "html": " Hello,<\/p>\n\n\n This is a courtesy e-mail to let you know that a ticket has been assigned to you.<\/p>\n\n {% if ticket.submitter_email %}The ticket was submitted by {{ ticket.submitter_email }}, and the subject{% else %}The ticket subject{% endif%} is {{ ticket.title }}<\/i>.<\/p>\n\n The ticket ID is {{ ticket.ticket }}<\/a><\/b>. It\"s priority is {{ ticket.get_priority_display }}.<\/p>", "plain_text": "Hello,\n\nThis is a courtesy e-mail to let you know that a ticket has been assigned to you.\n\n{% if ticket.submitter_email %}The ticket was submitted by {{ ticket.submitter_email }}, and the subject{% else %}The ticket subject{% endif%} is {{ ticket.title }}.\n\nThe ticket ID is {{ ticket.ticket }}, you can view it online at {{ ticket.staff_url }}. It\"s priority is {{ ticket.get_priority_display }}.", "heading": "Ticket Assigned To You", "subject": "(Assigned)"}}, {"pk": "3", "model": "helpdesk.emailtemplate", "fields": {"template_name": "closed_cc", "html": " Hello,<\/p>\n\n Ticket {{ ticket.title }}<\/i> ('{{ ticket.title }}') has been closed.<\/p>\n\n If you wish to view this ticket online, you can visit {{ ticket.staff_url }}<\/a>.<\/p>", "plain_text": "Hello,\n\nTicket {{ ticket.title }} (\"{{ ticket.title }}\") has been closed.\n\nIf you wish to view this ticket online, you can visit {{ ticket.staff_url }}.", "heading": "Ticket Closed", "subject": "(Closed)"}}, {"pk": "4", "model": "helpdesk.emailtemplate", "fields": {"template_name": "closed_owner", "html": " Hello,<\/p>\n\n A ticket currently assigned to you with a subject of {{ ticket.title }}<\/i> has been closed.<\/p>\n\n If you wish to view this ticket online, you can visit {{ ticket.staff_url }}<\/a>.<\/p>", "plain_text": "Hello,\n\nA ticket currently assigned to you with a subject of \"{{ ticket.title }}\" has been closed.\n\nIf you wish to view this ticket online, you can visit {{ ticket.staff_url }}.", "heading": "Ticket Closed", "subject": "(Closed)"}}, {"pk": "5", "model": "helpdesk.emailtemplate", "fields": {"template_name": "closed_submitter", "html": " Hello,<\/p>\n\n You recently logged a ticket with a subject of {{ ticket.title }}<\/i> with us. This e-mail is to confirm that this ticket has been closed.<\/p>\n\n If you believe that further work is required on this ticket, please let us know by replying to this e-mail and keeping the subject intact.<\/p>\n\n If you wish to view this ticket online, you can visit {{ ticket.ticket_url }}<\/a>.<\/p>", "plain_text": "Hello,\n\nYou recently logged a ticket with a subject of \"{{ ticket.title }}\" with us. This e-mail is to confirm that this ticket has been closed.\n\nIf you believe that further work is required on this ticket, please let us know by replying to this e-mail and keeping the subject intact.\n\nIf you wish to view this ticket online, you can visit {{ ticket.ticket_url }}.", "heading": "Ticket Closed", "subject": "(Closed)"}}, {"pk": "6", "model": "helpdesk.emailtemplate", "fields": {"template_name": "escalated_cc", "html": " Hello,<\/p>\n\n This is a courtesy e-mail to let you know that ticket {{ ticket.ticket }}<\/b><\/a> ({{ ticket.title }}<\/em>) has been escalated automatically.<\/p>", "plain_text": "Hello,\n\nThis is a courtesy e-mail to let you know that ticket {{ ticket.ticket }} (\"{{ ticket.title }}\") has been escalated automatically.\n\nYou can view this online at {{ ticket.staff_url }}.", "heading": "Ticket Escalated", "subject": "(Escalated)"}}, {"pk": "8", "model": "helpdesk.emailtemplate", "fields": {"template_name": "escalated_owner", "html": " Hello,<\/p>\n\n A ticket currently assigned to you with a subject of {{ ticket.title }}<\/i> has been automatically escalated.<\/p>\n\n Please review this ticket and attempt to provide a resolution as soon as possible.<\/p>\n\n If you wish to view this ticket online, you can visit {{ ticket.staff_url }}<\/a>.<\/p>", "plain_text": "Hello,\n\nA ticket currently assigned to you with a subject of \"{{ ticket.title }}\" has been automatically escalated.\n\nPlease review this ticket and attempt to provide a resolution as soon as possible.\n\nIf you wish to view this ticket online, you can visit {{ ticket.staff_url }}.", "heading": "Ticket Assigned to You Has Been Escalated", "subject": "(Escalated)"}}, {"pk": "7", "model": "helpdesk.emailtemplate", "fields": {"template_name": "escalated_submitter", "html": " Hello,<\/p>\n\n You recently logged a ticket with a subject of {{ ticket.title }}<\/i> with us. This e-mail is to advise you of an automated escalation of that ticket.<\/p>\n\n We will review your ticket shortly and attempt to provide a resolution as soon as possible.<\/p>\n\n If you wish to view this ticket online, you can visit {{ ticket.ticket_url }}<\/a>.<\/p>", "plain_text": "Hello,\n\nYou recently logged a ticket with a subject of \"{{ ticket.title }}\" with us. This e-mail is to advise you of an automated escalation of that ticket.\n\nWe will review your ticket shortly and attempt to provide a resolution as soon as possible.\n\nIf you wish to view this ticket online, you can visit {{ ticket.ticket_url }}.", "heading": "Your Ticket Has Been Escalated", "subject": "(Escalated)"}}, {"pk": "9", "model": "helpdesk.emailtemplate", "fields": {"template_name": "newticket_cc", "html": " Hello,<\/p>\n\n This is a courtesy e-mail to let you know that ticket {{ ticket.ticket }}<\/b><\/a> ({{ ticket.title }}<\/em>) has been opened.<\/p>", "plain_text": "Hello,\n\nThis is a courtesy e-mail to let you know that ticket {{ ticket.ticket }} (\"{{ ticket.title }}\") has been opened.\n\nYou can view this online at {{ ticket.staff_url }}.", "heading": "New Ticket Opened", "subject": "(Opened)"}}, {"pk": "10", "model": "helpdesk.emailtemplate", "fields": {"template_name": "newticket_submitter", "html": " Hello,<\/p>\n\n\n This is a courtesy e-mail to let you know that we have received your helpdesk query with a subject of {{ ticket.title }}<\/i>. <\/p>\n\n You do not have to do anything further at this stage. Your ticket has been assigned a number of {{ ticket.ticket }}<\/b>.<\/p>\n\n If you wish to send us further details, or if you have any queries about this ticket, please include the ticket id of {{ ticket.ticket }}<\/b> in the subject. The easiest way to do this is just press \"reply\" to this message.<\/p>\n\n If you wish to view this ticket online, you can visit {{ ticket.ticket_url }}<\/a>.<\/p>\n\n We will investigate your query and attempt to resolve it as soon as possible. You will receive further updates and a resolution via this e-mail address.<\/p>", "plain_text": "Hello,\n\nThis is a courtesy e-mail to let you know that we have received your helpdesk query with a subject of {{ ticket.title }}. \n\nYou do not have to do anything further at this stage. Your ticket has been assigned a number of {{ ticket.ticket }}.\n\nIf you wish to send us further details, or if you have any queries about this ticket, please include the ticket id of {{ ticket.ticket }} in the subject. The easiest way to do this is just press \"reply\" to this message.\n\nIf you wish to view this ticket online, you can visit {{ ticket.ticket_url }}.\n\nWe will investigate your query and attempt to resolve it as soon as possible. You will receive further updates and a resolution via this e-mail address.", "heading": "Your Ticket Has Been Opened", "subject": "(Opened)"}}, {"pk": "11", "model": "helpdesk.emailtemplate", "fields": {"template_name": "resolved_cc", "html": " Hello,<\/p>\n\n Ticket {{ ticket.ticket }} ({{ ticket.title }}<\/i>) has been resolved.<\/p>\n\n The following resolution was added:<\/p>\n\n This resolution has been e-mailed to the submitter, who will verify it before you can close this ticket.<\/p>\n\n If you wish to view this ticket online, you can visit {{ ticket.staff_url }}<\/a>.<\/p>", "plain_text": "Hello,\n\nTicket {{ ticket.ticket }} ({{ ticket.title }}) has been resolved.\n\nThe following resolution was added:\n\n{{ resolution }}\n\nThis resolution has been e-mailed to the submitter, who will verify it before you can close this ticket.\n\nIf you wish to view this ticket online, you can visit {{ ticket.staff_url }}.", "heading": "Ticket Resolved", "subject": "(Resolved)"}}, {"pk": "12", "model": "helpdesk.emailtemplate", "fields": {"template_name": "resolved_owner", "html": " Hello,<\/p>\n\n A ticket currently assigned to you with a subject of {{ ticket.title }}<\/i> has had a resolution added.<\/p>\n\n The following resolution was added to ticket {{ ticket.ticket }}<\/b>:<\/p>\n\n This resolution has been e-mailed to the submitter, who will verify it before you can close this ticket.<\/p>\n\n If you wish to view this ticket online, you can visit {{ ticket.staff_url }}<\/a>.<\/p>", "plain_text": "Hello,\n\nA ticket currently assigned to you with a subject of {{ ticket.title }} has had a resolution added.\n\nThe following resolution was added to ticket {{ ticket.ticket }}:\n\n{{ resolution }}\n\nThis resolution has been e-mailed to the submitter, who will verify it before you can close this ticket.\n\nIf you wish to view this ticket online, you can visit {{ ticket.staff_url }}.", "heading": "Ticket Resolved", "subject": "(Resolved)"}}, {"pk": "13", "model": "helpdesk.emailtemplate", "fields": {"template_name": "resolved_submitter", "html": " Hello,<\/p>\n\n You recently logged a ticket with a subject of {{ ticket.title }}<\/i> with us. This e-mail is to advise you of a resolution to that ticket.<\/p>\n\n The following resolution was added to ticket {{ ticket.ticket }}<\/b>:<\/p>\n\n Can you please confirm that this resolution addresses your needs so we may close this ticket? If you have any further queries, or if you do not believe this resolution is adequate, please reply to this e-mail and keep the subject intact.<\/p>\n\n If you wish to view this ticket online, you can visit {{ ticket.ticket_url }}<\/a>.<\/p>", "plain_text": "Hello,\n\nYou recently logged a ticket with a subject of \"{{ ticket.title }}\" with us. This e-mail is to advise you of a resolution to that ticket.\n\nThe following resolution was added to ticket {{ ticket.ticket }}:\n\n{{ resolution }}\n\nCan you please confirm that this resolution addresses your needs so we may close this ticket? If you have any further queries, or if you do not believe this resolution is adequate, please reply to this e-mail and keep the subject intact.\n\nIf you wish to view this ticket online, you can visit {{ ticket.ticket_url }}.", "heading": "Your Ticket Has Been Resolved", "subject": "(Resolved)"}}, {"pk": "14", "model": "helpdesk.emailtemplate", "fields": {"template_name": "updated_cc", "html": " Hello,<\/p>\n\n Ticket {{ ticket.ticket }}<\/a> ({{ ticket.title }}<\/em>) has been updated.<\/p>\n\n The following comment was added:<\/p>\n\n This information has {% if private %}not {% endif %} been e-mailed to the submitter.<\/p>\n\n If you wish to view this ticket online, you can visit {{ ticket.staff_url }}<\/a>.<\/p>", "plain_text": "Hello,\n\nTicket {{ ticket.ticket }} ({{ ticket.title }}) has been updated.\n\nThe following comment was added:\n\n{{ comment }}\n\nThis information has {% if private %}not {% endif %} been e-mailed to the submitter.\n\nIf you wish to view this ticket online, you can visit {{ ticket.staff_url }}.", "heading": "Ticket Updated", "subject": "(Updated)"}}, {"pk": "15", "model": "helpdesk.emailtemplate", "fields": {"template_name": "updated_owner", "html": " Hello,<\/p>\n\n Ticket {{ ticket.ticket }}<\/a> ({{ ticket.title }}<\/em>), which is assigned to you, has been updated.<\/p>\n\n The following comment was added to ticket {{ ticket.ticket }}<\/b>:<\/p>\n\n This information has {% if private %}not {% endif %} been e-mailed to the submitter.<\/p>\n\n If you wish to view this ticket online, you can visit {{ ticket.staff_url }}<\/a>.<\/p>", "plain_text": "Hello,\n\nTicket {{ ticket.ticket }} ({{ ticket.title }}), which is assigned to you, has been updated.\n\nThe following comment was added to ticket {{ ticket.ticket }}:\n\n{{ comment }}\n\nThis information has {% if private %}not {% endif %} been e-mailed to the submitter.\n\nIf you wish to view this ticket online, you can visit {{ ticket.staff_url }}.", "heading": "Ticket Updated", "subject": "(Updated)"}}, {"pk": "16", "model": "helpdesk.emailtemplate", "fields": {"template_name": "updated_submitter", "html": " Hello,<\/p>\n\n You recently logged a ticket with a subject of {{ ticket.title }}<\/i> with us. This e-mail is to advise you of an update to that ticket.<\/p>\n\n The following comment was added to ticket {{ ticket.ticket }}<\/b>:<\/p>\n\n To provide us with further information, please reply to this e-mail.<\/p>\n\n If you wish to view this ticket online, you can visit {{ ticket.ticket_url }}<\/a>.<\/p>", "plain_text": "Hello,\n\nYou recently logged a ticket with a subject of \"{{ ticket.title }}\" with us. This e-mail is to advise you of an update to that ticket.\n\nThe following comment was added to ticket {{ ticket.ticket }}:\n\n{{ comment }}\n\nTo provide us with further information, please reply to this e-mail.\n\nIf you wish to view this ticket online, you can visit {{ ticket.ticket_url }}.", "heading": "Your Ticket Has Been Updated", "subject": "(Updated)"}}]
diff --git a/models.py b/models.py
index 475047bc..decdc4a2 100644
--- a/models.py
+++ b/models.py
@@ -794,10 +794,12 @@ class KBItem(models.Model):
_('Last Updated'),
help_text=_('The date on which this question was most recently '
'changed.'),
+ blank=True,
)
def save(self, force_insert=False, force_update=False):
- self.last_updated = datetime.now()
+ if not self.last_updated:
+ self.last_updated = datetime.now()
return super(KBItem, self).save(force_insert, force_update)
def _score(self):
@@ -924,4 +926,3 @@ def create_usersettings(sender, created_models=[], instance=None, created=False,
models.signals.post_syncdb.connect(create_usersettings)
models.signals.post_save.connect(create_usersettings, sender=User)
-
diff --git a/templates/helpdesk/kb_category.html b/templates/helpdesk/kb_category.html
index 0105a1f9..7df3a601 100644
--- a/templates/helpdesk/kb_category.html
+++ b/templates/helpdesk/kb_category.html
@@ -12,7 +12,7 @@
{% blocktrans with item.category.title as category_title and item.category.get_absolute_url as category_url %}View other {{ category_title }} articles, or continue viewing other knowledgebase articles.{% endblocktrans %}{{ resolution }}<\/blockquote>\n\n
{{ resolution }}<\/blockquote>\n\n
{{ resolution }}<\/blockquote>\n\n
{{ comment }}<\/blockquote>\n\n
{{ comment }}<\/blockquote>\n\n
{{ comment }}<\/blockquote>\n\n
{{ resolution }}<\/blockquote>\n\n
{{ resolution }}<\/blockquote>\n\n
{{ resolution }}<\/blockquote>\n\n
{{ comment }}<\/blockquote>\n\n
{{ comment }}<\/blockquote>\n\n
{{ comment }}<\/blockquote>\n\n
{% for item in items %}
-{% trans "Article" %}
+{{ item.title }} {{ item.score }} {{ item.last_updated|timesince }} {{ item.title }} Rating: {{ item.score }} Last Update: {{ item.last_updated|timesince }} ago
{% endfor %}
diff --git a/templates/helpdesk/kb_item.html b/templates/helpdesk/kb_item.html
index 1b950f9d..251b84e1 100644
--- a/templates/helpdesk/kb_item.html
+++ b/templates/helpdesk/kb_item.html
@@ -1,4 +1,4 @@
-{% extends "helpdesk/public_base.html" %}{% load i18n %}
+{% extends "helpdesk/public_base.html" %}{% load i18n %}{% load markup %}
{% block helpdesk_body %}
{{ item.question }} {% blocktrans with item.title as item %}Knowledgebase: {{ item }}{% endblocktrans %}
@@ -7,7 +7,7 @@
{{ item.title }}
-{{ item.question }}
+{{ item.answer }} {{ item.answer|markdown }}