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

List "on-call" times #612

Open
marien-probesys opened this issue Apr 12, 2024 · 1 comment
Open

List "on-call" times #612

marien-probesys opened this issue Apr 12, 2024 · 1 comment
Assignees
Labels
type: usability testing We need to perform testing with users to evaluate the features

Comments

@marien-probesys
Copy link
Member

marien-probesys commented Apr 12, 2024

Problem

Agents may have to work "on-call" (i.e. outside of their standard work hours). They need to list these times, recorded as "spent times" in Bileto, in order to justify of bonuses on their salaries.

Solution

There are several potential (but costing) solutions:

  • add an "on-call" checkbox next to the spent time input — but it's too specific;
  • make it more generic with a category system associated to the spent times — but it would clutter the interface quite a bit;
  • consider the spent times recorded outside of the work hours of the user (configurable in their profile) being "on-call" — but an agent may record these times the day after, during their work hours;
  • add a spentTime.description field, and use the editor content as description instead of creating a new Message — but it changes too much the behavior of the answer form and I'm not ready for it yet.

As our need for this feature is quite specific and could evolve in the future, we're going for a more discrete and simpler solution for now. We'll simply attach the spent times to the messages created when answering. Meaning that an agent could use a specific word in the message (e.g. "#oncall"). Then, an admin could extract the matching spent times from the database with SQL:

SELECT u.email, SUM(ts.real_time)
FROM time_spent ts, users u, message m
WHERE ts.created_by_id = u.id
AND ts.message_id = m.id
AND m.content LIKE '%#oncall%'
AND ts.created_at >= '2024-11-01'
AND ts.created_at < '2024-12-01'
GROUP BY u.email;

Specifications

Attaching Message to TimeSpent

Add a new field to TimeSpent:

  • message, relation ManyToOne, nullable, and SET NULL on delete.

Then, in \App\Service\TicketTimeAccounting, allow to pass a message to the accountTime() method (default null), and set it to all the time spent created in the method.

In \App\Controller\MessagesController, pass the message to the method.

@marien-probesys
Copy link
Member Author

Time spent is now attached to the corresponding message in database. Let's keep this issue opened to remember it and improve the feature.

@marien-probesys marien-probesys added type: usability testing We need to perform testing with users to evaluate the features and removed ready ✅ You can work on this! type: new Global features that aren't there yet labels Nov 19, 2024
@marien-probesys marien-probesys removed this from the Version 0.12-beta milestone Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: usability testing We need to perform testing with users to evaluate the features
Projects
None yet
Development

No branches or pull requests

1 participant