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

Feat(ticketing) Use Freshdesk #3668

Merged
merged 24 commits into from
Sep 3, 2024
Merged

Feat(ticketing) Use Freshdesk #3668

merged 24 commits into from
Sep 3, 2024

Conversation

ahdamin
Copy link
Contributor

@ahdamin ahdamin commented Aug 29, 2024

Description

Changed

  • replace osticket with freshdesk

ahdamin and others added 13 commits August 6, 2024 13:34
### Added
Freshdesk Variables
* instantiate freshdesk client

* create ticket with freshdesk client

* add frehdesk client

* add freshdesk to fixtures

* refactor tests for Freshdesk

* remove redundant type hint

* change decorators to context managers

* fix mock setup

* add type hints

* fix freshdesk ticket submission

* rename FreshDesk client variable

* rename ticket client variable

* update ticket handling integration

* refactor integration with ticket handler

* refactor models for attachments and responses

* refactor for Freshdesk integration

* refactor attachment hanlding for Freshdesk

* reformat

* inject Freshdesk client dependency

* use OrdersAPI instance

* initialize ticket handler and OrdersAPI

* reformat

* rename Freshdesk client variable

* add error handling and logging

* refactor error handling

* remove commentsx

* remove api variable

* remove logging at the info level

* replace osticket with freshdesk

* update ticket mock creation

* use https protocol

* remove _url method

* remove comments

* correct a typo

* use file attachment method from utils

* move out attachment processing

* add attachment handling

* check attributes values

* return single attachment

* fix temp attachment method

* remove attachment model

---------

Co-authored-by: AhmedAmin-ki <[email protected]>
Co-authored-by: Vincent Janvid <[email protected]>
* add multipart conversion

* add custom fields

* handle HTTPError response

* add type, tags, and custom fields

* remove comment

* use list comprehension for multipart

* remove env from FreshdeskClient

* remove env constructor

* add env to TicketHandler

* set freshdesk env to Stage

* shift env to TicketHandler

* remove irelevant multipart data conversion

* add multipart conversion method

* use multipart in ticket creation

* remove env from freshdesk_client

* use prepare attachment

* use TicketCreate model

* update TicketHandler parameters

* refactor ticket connection method

* implement ticket reply functionality

* remove user_mail

* remove order_email_id from FreshdeskClient

* update TicketHandler FreshdeskClient  parameters

* remove comment

* remove FormDataRequest

* remove: email

* reformat

* mock replying to tickets

* reformat

* remove osticket

* cancel changes

* revert back to using emails

* remove mail from replies

* add from_email to reply

* use ReplyCreate model

* add ReplyCreate model

* add detailed error logging

* integrate ReplyCreate model

* remove user_mail from connec

* use f-string

---------

Co-authored-by: AhmedAmin-ki <[email protected]>
Co-authored-by: Ahmed Amin <[email protected]>
Co-authored-by: ahdamin <[email protected]>
@Vince-janv Vince-janv changed the title Dev freshdesk Feat(ticketing) Use Freshdesk Aug 30, 2024
Copy link
Contributor

@Vince-janv Vince-janv left a comment

Choose a reason for hiding this comment

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

Nice work! Some comments about class instantiation

cg/clients/freshdesk/freshdesk_client.py Outdated Show resolved Hide resolved
cg/meta/orders/ticket_handler.py Outdated Show resolved Hide resolved
cg/server/app_config.py Show resolved Hide resolved
Copy link

sonarqubecloud bot commented Sep 3, 2024

@ahdamin ahdamin marked this pull request as ready for review September 3, 2024 07:53
@ahdamin ahdamin requested a review from a team as a code owner September 3, 2024 07:53
@ahdamin
Copy link
Contributor Author

ahdamin commented Sep 3, 2024

@Vince-janv please review and test

@clingen-sthlm clingen-sthlm temporarily deployed to stage September 3, 2024 11:22 Inactive
@Vince-janv Vince-janv merged commit fc11fd5 into master Sep 3, 2024
9 checks passed
@Vince-janv Vince-janv deleted the dev-freshdesk branch September 3, 2024 12:04
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.

4 participants