Skip to content

Add Conversation Code to support TicketID on automation and Canned #4

New issue

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

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

Already on GitHub? # to your account

Draft
wants to merge 19 commits into
base: develop
Choose a base branch
from

Conversation

ThanhKhoaIT
Copy link

This pull request introduces a new code attribute to the Conversation model and updates various parts of the codebase to support this new attribute. The changes include modifications to the model, database schema, and several views.

Key changes include:

Model and Database Changes:

  • Added a new code attribute to the Conversation model, including validation and a before_validation callback to generate a unique code for each conversation (app/models/conversation.rb). [1] [2] [3] [4]
  • Created a migration to add the code column to the conversations table and populate it with unique values (db/migrate/20250227072350_add_code_to_conversations.rb).
  • Updated the schema to reflect the new code column and its index (db/schema.rb). [1] [2] [3]

View Changes:

  • Updated various JSON views to include the new code attribute in the conversation data (app/views/api/v1/accounts/search/conversations.json.jbuilder, app/views/api/v1/conversations/partials/_conversation.json.jbuilder, app/views/api/v1/models/_conversation.json.jbuilder, app/views/public/api/v1/models/_conversation.json.jbuilder). [1] [2] [3] [4]

Frontend Changes:

  • Added new message variables for conversation.code and inbox details in the constants file (app/javascript/shared/constants/messages.js).
  • Updated the ReplyBox.vue component to include the inbox in the message variables (app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue).

Helper Method:

  • Added a code method to the ConversationDrop class to expose the new attribute (app/drops/conversation_drop.rb).

@ThanhKhoaIT ThanhKhoaIT self-assigned this Feb 27, 2025
@ThanhKhoaIT
Copy link
Author

Wait to merge and release chatwoot/utils#47

Copy link

🐢 Turtley slow progress alert! This pull request has been idle for over 30 days. Can we please speed things up and either merge it or release it back into the wild?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant