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

Add Support Ticket System: Schema, Controller, Middleware, and Routes #963

Closed
IkkiOcean opened this issue Nov 9, 2024 · 2 comments · Fixed by #971
Closed

Add Support Ticket System: Schema, Controller, Middleware, and Routes #963

IkkiOcean opened this issue Nov 9, 2024 · 2 comments · Fixed by #971
Assignees

Comments

@IkkiOcean
Copy link
Contributor

Description:

We need to implement a support ticket system to allow users to create, manage, and track support tickets. This will involve the following:

  1. Ticket Schema: A schema to store ticket details such as ticket ID, user ID, subject, description, status (open, in-progress, resolved), priority, and timestamps.
  2. Controller: Logic to handle the creation, updating, and status tracking of tickets.
  3. Middleware: Middleware for validating user requests, ticket status, and ensuring appropriate access control (e.g., ensuring only the assigned agent can update a ticket).
  4. Routes: Define API routes to handle actions such as:
    • Creating a new ticket
    • Fetching ticket details
    • Updating ticket status
    • Assigning tickets to agents

Tasks:

  • Schema Design:

    • Create a Ticket schema with fields like ticketId, userId, subject, description, status (open, in-progress, resolved), priority, assignedAgentId, createdAt, and updatedAt.
  • Controller:

    • TicketController: Logic to create new tickets, fetch ticket details, update ticket status, assign agents, and manage ticket resolution.
  • Middleware:

    • Validation middleware to ensure only authorized users (agents) can update the status of tickets.
    • Ensure that users cannot modify tickets that do not belong to them.
    • Check for required fields when creating or updating tickets.
  • Routes:

    • POST /api/tickets: To create a new support ticket.
    • GET /api/tickets/:ticketId: To fetch details of a specific ticket.
    • PUT /api/tickets/:ticketId/status: To update the status of a ticket.
    • PUT /api/tickets/:ticketId/assign: To assign a ticket to a support agent.

Expected Outcome:

  • Well-structured schema to store ticket information.
  • Functional controller logic to handle ticket creation, updates, and status changes.
  • Middleware to ensure correct access control and data validation.
  • REST API routes to create, fetch, update, and assign support tickets.
Copy link
Contributor

github-actions bot commented Nov 9, 2024

Thank you for creating this issue! 🎉 We'll look into it as soon as possible. In the meantime, please make sure to provide all the necessary details and context. If you have any questions or additional information, feel free to add them here. Your contributions are highly appreciated! 😊

You can also check our CONTRIBUTING.md for guidelines on contributing to this project.

Copy link
Contributor

Hello @IkkiOcean! Your issue #963 has been closed. Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants