Skip to content

Add computed fields on requests #473

@slint

Description

@slint
  • Last reply (last_reply): The last comment event in the request. This is useful for understanding who and when is currently handling the request (but also good for getting quick information in the request list views)
  • Last creator action (last_creator_event): Last creator event of the request
  • Last receiver action (last_receiver_event): Last receiver event of the request
  • Number of timeline events (events_count): Aggregated counts of the different types of timeline events in the request (comments, actions, etc.)

Other fields which can be useful for time tracking and statistics:

  • Duration open (duration_open): Total time where the request was open, excluding time when it was pending on the creator. This is useful for understanding how long requests are open and how quickly they are handled.
  • First response at (first_response_at): The time of the first response to the request, useful for calculating support KPIs.
  • Submitted at (submitted_at): The time when the request was submitted, useful for more precise tracking of request submission times.
  • Closed at (closed_at): The time when the request was closed, which can be in various states such as expired, cancelled, accepted, or declined. This is useful for statistics and tracking the lifecycle of requests.
  • Accepted by (accepted_by): The user who accepted the request
  • Declined by (declined_by): The user who declined the request
  • Cancelled by (cancelled_by): The user who cancelled the request

The above fields can be added to the request API class as computed systemfields, and only get dumped to the search index using a custom search dumper. Grouping computation of these fields could help minimize DB queries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions