Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to track queue change in follow-ups #1167

Merged
merged 12 commits into from Apr 12, 2024

Conversation

samsplunks
Copy link
Contributor

Because of Time calculation feature that allows for time in specific queues not to be counted in, we need to track queue changes in TicketChanges.

As ticket changes are related to follow-ups, I have added the ability to change ticket queue in the "Change Further Details" of the ticket view.

If this is approved, it will enable me to code correct calculation for the FOLLOWUP_TIME_SPENT_EXCLUDE_QUEUES setting.

In my use case, queues are used to pass tickets to different teams.

@samsplunks
Copy link
Contributor Author

samsplunks commented Apr 8, 2024

In the "Change Further Details" section, it seems that you cannot edit the ticket title.
I'll have a look at it.

Issue created here

Copy link
Collaborator

@uhurusurfa uhurusurfa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change seems reasonable to me.
Could you add a small unit test for this additional feature (maybe in helpdesk/tests/test_ticket_actions.py)?

@samsplunks
Copy link
Contributor Author

Thanks, yes I will and I will also update the time calculation code relative to each follow-up.

The idea is that if a helpdesk admin wants to introduce time_spent auto calculation or wish to modify the calculation settings, he can make a queryset with all FollowUps, remove time_spent and .save() to (re)calculate the time.

@samsplunks
Copy link
Contributor Author

I have refactored the time_spent_calculation so it doesn't make unnecessary queries when no exclusion is set.

It is now dealing with queue changes over time with the newly introduced TicketChange for field _('Queue').

A unit test was made to validate creation of the TicketChange together with the modification of the ticket queue.

Another one to test multiple queue exclusions over time with correct time_spent calculation.

uhurusurfa
uhurusurfa previously approved these changes Apr 9, 2024
Copy link
Collaborator

@uhurusurfa uhurusurfa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - thanks for adding the unit tests

@uhurusurfa
Copy link
Collaborator

@Benbb96 - if you do not see any issues here then please merge the PR

Copy link
Member

@Benbb96 Benbb96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few feedbacks, but it's really good work. The feature seems to be complete now!

helpdesk/templates/helpdesk/ticket.html Outdated Show resolved Hide resolved
helpdesk/update_ticket.py Outdated Show resolved Hide resolved
samsplunks and others added 2 commits April 12, 2024 10:39
…late

Co-authored-by: Benbb96 <Benbb96@users.noreply.github.com>
Co-authored-by: Benbb96 <Benbb96@users.noreply.github.com>
@samsplunks
Copy link
Contributor Author

samsplunks commented Apr 12, 2024

Thank you @Benbb96, suggestions committed!

I need a signal sent when the ticket is updated.
If you want, I will update other TicketChange at the same time in a next PR.

Copy link
Member

@Benbb96 Benbb96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, no problem!

@Benbb96 Benbb96 merged commit 9f7c18e into django-helpdesk:main Apr 12, 2024
8 checks passed
@samsplunks samsplunks deleted the followup_queue_change branch April 12, 2024 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants