Commit Graph

1580 Commits

Author SHA1 Message Date
Georg Lehner
66ba2d076a
Merge branch 'django-helpdesk:main' into attachment-enable-setting 2024-06-14 18:33:19 +02:00
Georg Lehner
9228c7fbd0 Fix Fix: correct variable name and test 2024-06-12 15:04:23 +02:00
Georg Lehner
80ae20d1ac Fix: Saving tickets with attachments disabled raises error
Exclude code where followups add their attachments to a new ticket.
Make helper function _attach_files_to_follow_up() more robust.
2024-06-12 14:58:00 +02:00
Georg Lehner
665e4008e7 Cleanup Dependency/Resolves form code 2024-06-10 17:33:08 +02:00
Georg Lehner
0b38f1d5bd Remove superfluous use of Value() in When clause 2024-06-10 17:27:43 +02:00
Georg Lehner
20cd08fe28 Do not show attachments in public tickets if not enabled, fix attachment upload if enabled
Attachments in followups were still shown (if they existed) even if
HELPDESK_ENABLE_ATTACHMENT was set to False.

If attachments were enabled it was not possible to upload them because
the JavaScript code for uploading attachments to public was not loaded
in the template.
2024-06-10 12:47:13 +02:00
Georg Lehner
78cf89ca9b Exclude related JavaScript function from staff Ticket view when attachments are not enabled 2024-06-10 11:24:00 +02:00
Georg Lehner
54864b2c1e Rewrite dependency tickets ordering, using Case annotation 2024-06-10 10:08:07 +02:00
Georg Lehner
ec603347c7 Improve code quality 2024-06-08 22:32:05 +02:00
Georg Lehner
2cb9d382cb Only show open ticket as dependency/parent candidates
It makes no sense to make a ticket depend on an already closed
ticket, or to make a closed ticket depend on another.

The only case I can think of is to create such a relationship in
hindsight for documentation purposes.  This can be implemented by
adding an admin interface or giving the administrator more choices.
2024-06-08 18:49:53 +02:00
Georg Lehner
7bf21685b3 Fix: remove unused and undefined context variable 2024-06-08 12:52:10 +02:00
Georg Lehner
bc764b50c1 Fix: itertools are superseded by NotIn ORM operator 2024-06-08 12:12:56 +02:00
Georg Lehner
25c36a6f5c Restrict ticket selection for dependencies and parents
When adding a dependent or parent ticket, the choice field in the
ticket selection form excludes:

- All existing dependencies of the current ticket.
- All existing parent tickets of the current ticket.
- The current ticket itself.

The first two prevent immediate circular references: A dependency
cannot be a parent and vice versa.  Deeper circular references are
not covered by this: a ticket can still be its own grandchild.

They also prevent current behavior of throwing an `IntegrityException`
when selecting a dependency or parent.

The third one prevents also a quirky behavior: until now, specifying the
ticket itself as parent or dependency just does not save the
dependency and does not issue a warning either.
2024-06-08 12:11:01 +02:00
Georg Lehner
b52ab69c42 Order dependend ticket with NotIn ORM operator instead of itertools 2024-06-08 12:00:43 +02:00
Georg Lehner
3dcbdad638 Fix: helpdesk settings are imported as settings 2024-06-07 18:04:05 +02:00
Georg Lehner
a2f944b475 Enable attachments by default
In order to not break existing django-helpdesk installations
upon upgrade.
2024-06-07 17:58:41 +02:00
Georg Lehner
cc1b125d53 Disable email attachment processing and email saving if attachments are not enabled.
Caution: untested
2024-06-06 15:58:27 +02:00
Georg Lehner
dd4c04945a Add HELPDESK_ENABLE_ATTACHMENTS setting and make it show/hide attachment related UI
Default setting is false. This is not backward compatible.
The rationale is: attachments contain most likely sensitive information.
By default they are served without access control.  Currently there is
no simple feature to configure access control.  To avoid unintentional
disclosure attachments should be an opt in: you have been warned.
2024-06-06 15:47:50 +02:00
Georg Lehner
887483a6d6 Remove status from ticket heading, since it is now shown in the description table 2024-06-06 00:34:28 +02:00
Georg Lehner
d7afcb6578 Reformat Resolves/Depends lists into tables. Allow adding/deleting of parent tickets 2024-06-06 00:28:36 +02:00
Georg Lehner
5b2441b994 Add list of 'parent' tickets to ticket description table
'parent' tickets are all tickets on which the current ticket depends.

The parent tickets can only be resolved if the current tickets is closed.

This patch splits the current |Dependencies|Total time spent| table row
in two rows.  The table layout is now

    |Status |Total time spent|
    |Depends|Resolves        |

Status and Total time only have one line.  Status was chosen as filler
field, because I believe it should be moved out of the title to reduce
visual distraction.

Depends and Resolve will have a variable number of lines and are closely
related.

Depends was chosen instead of "Dependencies", to indicate directly what
the listed tickets do and because it is shorter.

The commit also simplifies the wording of the tooltips and harmonizes with
the other tooltips in the same table: It indicates directly what happens
when the button is clicked (or touched!).

Notes:

- The complete row could be omitted if now Depends or Resolves exists for
  a ticket.  This would reduce visual distraction but was not implemented
  because it could lead to misled expectations.
- No button for removing/adding parent tickets was added. If considered
  important this can be added any time.  Currently a user has to go to
  the parent ticket and delete the dependency (easy) or remember the ticket
  id/title, search for the parent and add the ticket as dependency (difficult)
2024-05-17 12:34:40 +02:00
Georg Lehner
95755125fb Add datatables error message to error pop up 2024-05-14 21:46:18 +02:00
Georg Lehner
25f338cfc5 Pop up a nice error message when an AJAX request fails. 2024-05-11 16:41:01 +02:00
Benbb96
306a01a8b4
add login again button and reformat logged_out.html 2024-05-08 16:25:49 +02:00
Benbb96
ef5a43a3e2
remove unused import 2024-05-08 16:05:22 +02:00
Benbb96
485ac1294c
remove next_page parameter and show how to set LOGOUT_REDIRECT_URL in settings 2024-05-08 15:47:14 +02:00
Benbb96
b1316214c7
replace hardcoded path ../ to reverse_lazy URL 2024-05-07 15:50:51 +02:00
Benbb96
2d561d15c8
fix design on login/logout button when not staff 2024-05-07 15:43:12 +02:00
Benbb96
6fe5f1681f
fix logout in Django 5 with POST action instead of GET 2024-05-07 14:54:05 +02:00
ilikerobots
89ab173034 update raw parameter name to match view 2024-05-03 10:38:17 +03:00
Christopher Broderick
a6bb99f1e8
Merge branch 'main' into view_protectors 2024-04-29 21:25:36 +01:00
Christopher Broderick
dba8a889a3
Merge pull request #1172 from jorge-leon/fix-public-view-and-context-help-urls
FIX: replace hardcoded urls with Django generated ones. Fixes #1171
2024-04-24 19:05:07 +01:00
Timothy Hobbs
8f9d385e10
Merge branch 'main' into view_protectors 2024-04-23 21:29:38 +02:00
Timothy Hobbs
ebbbcdb2aa Deprecate VALID_EXTENSIONS properly 2024-04-22 18:38:59 +02:00
Georg Lehner
c723873d83 FIX: replace hardcoded urls with Django generated ones.
The My Tickets view generated ticket urls with a '/view' string prefix. This
is replaced by proper Django URL resolution.

The public and staff ticket view used a '../../' string prefix which brakes in
the public ticket view. They are both replaced with proper Django URL resolution.
2024-04-17 21:17:41 +02:00
Sam Splunks
8541acd49d Updated comment 2024-04-17 10:21:02 +00:00
Sam Splunks
2fc95d165a new_ticket_done signal emitted through email 2024-04-17 10:19:50 +00:00
Sam Splunks
81f9226f7c Removed unused webhooks import 2024-04-17 10:09:15 +00:00
Sam Splunks
9a6939b564 Attach send_new_ticket_webhook to the new_ticket_done signal 2024-04-17 10:02:44 +00:00
Sam Splunks
c6cad5f702 Removed unused webhooks import 2024-04-16 08:52:22 +00:00
Sam Splunks
c0ee8e0847 Use update_ticket mechanism in email.py 2024-04-16 08:49:11 +00:00
Sam Splunks
79b7ce9650 notify_followup_webhooks used in email, so moving signal triggering code 2024-04-16 08:42:03 +00:00
Sam Splunks
0e96909f43 Removed unused TichetChange import 2024-04-16 08:36:29 +00:00
Sam Splunks
08ed2a5035 Adding receiver import 2024-04-16 08:34:03 +00:00
Sam Splunks
ebb9a4d50d Make update_ticket_done signal trigger notify_followup_webhooks 2024-04-16 08:23:06 +00:00
Sam Splunks
2499f81d4d Add a signal when the ticket upate is done (every related instance created and updated) 2024-04-16 08:04:01 +00:00
Sam Splunks
8fffae343c Update TicketChange creation code 2024-04-16 07:58:33 +00:00
Sam Splunks
a775622521
Create ticket change through instance relationship
Co-authored-by: Benbb96 <Benbb96@users.noreply.github.com>
2024-04-12 10:44:56 +02:00
Sam Splunks
5b39c9aeeb
Update forloop for queues with explicit variable names in ticket template
Co-authored-by: Benbb96 <Benbb96@users.noreply.github.com>
2024-04-12 10:39:58 +02:00
Sam Splunks
62ef86a047 Settings assertion values in hours 2024-04-09 13:45:41 +00:00