#634: Обновление v4.6.x

Инструкция

ВАЖНО! Перед обновлением на v4.6.x необходимо иметь версию Swarmica не ниже v4.5.1

Подготовка

1. Для обновления проверьте, что в конфигурационном файле .env поставлена версия v4.6.1:

~# grep VERSION .env
SW_FRONTEND_VERSION=v4.6.1
SW_BACKEND_VERSION=v4.6.1

2. Проверьте, что в файле /root/swarmica/docker-compose.yml отсутствует volume swarmica_articles и все ссылки на него:

~# grep swarmica_articles /root/swarmica/docker-compose.yml
~#

Если вывод возвращает какие-либо строки, то отредактируйте файл и удалите строки с swarmica_articles

Обновление

Будет прерывание сервиса на несколько минут, рекомендуется выполнять обновление в часы, когда использование системы минимально

Выполните обновление с перезагрузкой системы:

docker compose pull
docker compose up -d --remove-orphans

После обновления

После того, как все контейнеры запустятся и сервис станет доступен через веб-интерфейс, выполните пост-апгрейдные шаги:

1. Запустите команду пост-старт, чтобы обновить файлы статики, индексы поиска и выполнить другие необходимые процедуры:

docker exec --env-file .env -it swarmica-django-1 python manage.py post_start

Эта команда может занять долгое время, в зависимости от количества данных в системе.

2. Выполните команду, которая объединит множественные чат-сессии в одну в рамках одного тикета:

docker exec --env-file .env -it swarmica-django-1 python manage.py merge_chat_sessions

3. Выполните команду, которая перенесет глобальные настройки сервера из .env в базу данных, чтобы их стало возможно менять через веб-интерфейс:

docker exec --env-file .env -it swarmica-django-1 python manage.py migrate_instance_settings_from_env

4. После того, как все успешно обновлено и работоспособность проверена, можно удалить неиспользуемые данные docker для освобождения дискового пространства:

docker system prune -a

ВАЖНО! Убедитесь, что все контейнеры успешно запустились, перед запуском этой команды

Список изменений

Frontend

  • Feature #1362: Added component for displaying products in the article
  • Feature #1433: Supported ai providers in settings
  • Feature #1540: Added help for Billmanager
  • Feature #1541: Added help for Mango Office
  • Feature #1544: Added help for Email
  • Feature #1545: Added help for VK, Widget, Telegram, Whatsapp
  • Feature #1548: Added instance management to the settings
  • Feature #1557: ai buttons in mdxEditor toolbar
  • Feature #1560: change loader in ai quill and mdxeditor
  • Feature #1561: emoji button to quill toolbar
  • Feature #1563: Added helps and supported CC settings for email channels
  • Feature #1571: change the chat page adding the ability to see and edit chat and ticket properties
  • Feature #1572: show start new chat button for customer only if feature-flag
  • Feature #1574: Changed structure of QA section in settings
  • Feature #1575: Added QA rules management in settings
  • Feature #1576: Added a widget for management of qa rules for employee and displaying qa rules in evaluation list
  • Feature #1578: Supported issue trackers in settings
  • Feature #1582: ticket comment sync statuses
  • Feature #1583: search chats by ticket title
  • Feature #1593: Added logic to open QA rules tabs when the 'Quality Assurance' switch is enabled
  • Feature #1596: Added an icon for IssueTrackers in settings
  • Feature #1600: employees chat status updates via ws and manual refresh
  • Feature #1601: hide kcs article body
  • Feature #1603: Added descriptions for QA in settings
  • Feature #1604: Added code highlighting in help for Widget
  • Feature #1615: Changed chat statuses to ticket statuses, optimized number of requests to backend
  • Feature #1620: Added getting list of issue trackers and ai providers from backend
  • Feature #1623: Removed chatassignee and close chat widgets
  • Feature #1625: Added saving selected chat filter and selected chat in SS
  • Feature #1626: Added new Sidebar icons for Chats and Templates
  • Feature #1631: Added routing and fixed links for chats
  • Feature #1641: Added a display state for ksc article of in ticket
  • Feature #1642: Replaced code and code-block icons
  • Feature #1644: Added 'AITranslate' button for editors
  • Feature #1645: Added qa_samplesize metric
  • Feature #1655: Added time field validation to SLA policy
  • Feature #1659: Supported ticket classifier in settings
  • Feature #1660: Improved display of issue trackers edit forms, fixed translations
  • Feature #1661: ai providers table consumption
  • Feature #1662: Supported last_comment_by field
  • Feature #1664: change ai providers widgets width
  • Feature #1666: Added the ability to disable scrolling in dropdown
  • Bug #1067: Added helps for Autoassign in settings, and when skills are unconfigured
  • Bug #1555: Added escaping for 'get' & 'set' in mdxeditor
  • Bug #1559: Fixed error when invalid time zone
  • Bug #1566: Fixed error when issue tracker undefined
  • Bug #1567: Changed icons, removed title
  • Bug #1568: fix translation for rephrase dropdown items
  • Bug #1570: insert responce from ai with markdown style in mdxeditor
  • Bug #1579: Fixed test form for email channels
  • Bug #1580: Added a hint when segments are unconfigured
  • Bug #1581: Fixed missing onChange in @mdxeditor when editing inside tables
  • Bug #1584: hide ticket issues in ticket chat widget if issue tracker null
  • Bug #1585: show ticket status in chat card
  • Bug #1586: in chats page move chats and employees filter to start position
  • Bug #1587: remove unnecessary ticket refresh when comment send
  • Bug #1588: always show chat card title
  • Bug #1589: increased the width for ticket properties on the chat page and replaced the text with an icon in the save ticket status button
  • Bug #1590: hide chat input when ticket has readonly status
  • Bug #1591: Added widget for Evaluator, changed warning, added help for qa
  • Bug #1595: Added a description for ai providers
  • Bug #1598: fix badge close btn position
  • Bug #1602: fix chat background colors in dark theme
  • Bug #1606: fix chat color in dark theme
  • Bug #1607: fix chats styles
  • Bug #1608: fix min width for sla counter
  • Bug #1609: Added a few languages to codeblock for mdxeditor
  • Bug #1610: fix autoassign variant desctiption
  • Bug #1612: Added TextEllipsis when ShowUser is long
  • Bug #1616: Added a refresh chat list when ticket status or assignee changed
  • Bug #1617: Added a refresh of last updated in chat list
  • Bug #1627: Added ticket refresh on 'ticketChanged' in ws
  • Bug #1628: Added validation and changed input type for 'from_email'
  • Bug #1630: Removed refresh of chat list on ticket page
  • Bug #1632: Added a check when there is no chat
  • Bug #1633: Fixed fork from chat
  • Bug #1636: Fixed issue preventing user role upgrade
  • Bug #1637: Added a layout fix for the tag selection component
  • Bug #1646: Changed name of 'time_estimate' for 'ru' locale
  • Bug #1649: Fixed CSAT event display
  • Bug #1651: Added a check for 'ticketCommentSyncStatusUpdated' in ws
  • Bug #1654: Fixed unnecessary submitting form
  • Bug #1665: Excluded blocked users as ticket requesters
  • Bug #1673: Fixed bug with losing focus in mdxeditor
  • Bug #1676: Added Suspense for ObjectNameByUid
  • Bug #1678: fix missing auto-refresh in empty ticket and article lists
  • Devops: Bump version to v4.6.0
  • Devops: Bump version to v4.6.1
  • Docs #1638: Updated the environment deployment documentation
  • Locales #1652: Changed translations of ai buttons for 'ru' locale
  • Locales #1667: fix russian translations

Backend

  • Feature #2135: add ability to track token consumption for ai providers, add ability to track token balance for gigachat
  • Feature #2136: The fields currency, email_config on the Instance object have been made editable, and an API for editing Instance has been added. Deleted the mailjet connection, unlinked the issues and email settings from the env configuration
  • Feature #2149: The issue tracker storage in models and their management through the API has been implemented. Fixed the creation of a qa_evaluator in mock data
  • Feature #2150: Modified Yandex issue status parsing: from status to type status.
  • Feature #2153: use ticket resolved date instead of update date fot filtering for old attachments
  • Feature #2156: Implemented the API for AiProviders, and also added validation of the required fields before activation
  • Feature #2161: add controls for email CC management to email channel
  • Feature #2165: Implemented the logic of custom rules for QAEvaluations
  • Feature #2173: add tracking of ticket comment sync to billmanager
  • Feature #2179: When changing the assignee on ticket, update the assignee in open chats
  • Feature #2180: Auto-closing of chat sessions by time has been removed and ticket reopening has been added with a new message to the chat session from the client.
  • Feature #2183: Allow ADMIN to file/create surveys "on behalf" by API, plus docs fix #2189, #2182
  • Feature #2185 #2184: create api for token consumption model, group ai api documentation together
  • Feature #2188: Added retrieve method for QASampleRules
  • Feature #2191: Redesigned adding/removing qa_sample_rules to users by analogy with Autoassign
  • Feature #2195: Added parsing of AI responses to html
  • Feature #2198: Redid the chat_status toggle for chat_session.assignee
  • Feature #2200: Added ticket__subject search in /api/chats/
  • Feature #2202: autocreate and manage article file index for ai assistant
  • Feature #2203: add functionality for creating ai assistants for yandex cloud
  • Feature #2204: add automatic update to search index for ai assistant
  • Feature #2205: add api for yandex ai assistants
  • Feature #2212: Added skill classification of tickets when creating
  • Feature #2213: Added the agentChatStatusChanged event to ws/notifications
  • Feature #2215: remove deprecated docker volume for articles, add ai colume to cron container
  • Feature #2216: add ability to load and reload license by code and through command
  • Feature #2217: Implemented the management of the classifier of tickets and its training
  • Feature #2223: allow custom context from env in imap connection
  • Feature #2224: Redesigned the logic of working with chat sessions for ticket statuses
  • Feature #2225: Added a ticket search by requester's email
  • Feature #2226: Added an article search by translations body
  • Feature #2230: Removed chat assignee field, use ticket assignee instead
  • Feature #2234: Restored ticketChanged sending and added assigneeChanged to ws/tickets
  • Feature #2236: Added messages ticketStatusChanged and ticketAssigneeChanged to ws/chats/
  • Feature #2239: Removed USER_ROLES_BLOCKED from ticket_email_error notification
  • Feature #2246: Use ticket_id in chats instead of session_uid
  • Feature #2249: change pre start command to force load license by code
  • Feature #2253: Added a eula fixture for internal users
  • Feature #2254: Added the translate_text method to existing providers
  • Feature #2256: refactor ai assistant api
  • Feature #2257: Changed statuses for use in any type of classifier, added on/off api
  • Feature #2258: Added field 'last_comment' to ticket
  • Feature #2260: Redesigned user filter to work with arrays in token consumption
  • Feature #2261: Added sending files as attachments instead of links when the ATTACHMENTS_AS_FILES flag is enabled.
  • Feature #2265: Added the show_version_number and image fields to Product, as well as an API for managing the Product image
  • Feature #2266: Added support for chat filters
  • Feature frontend#1582: add channel type to websocket message on comment sync update
  • Bug #1577: provide only available locales in get_translations_for_object for...
  • Bug #2030: handle text=null case in replace_mentioned() function
  • Bug #2160: Ignore message body decoding errors in parse_incoming_email
  • Bug #2162: proper handle exception whe loading decoded json in OTP login view
  • Bug #2163: use datetime.timezone.utc instead of timezone.utc (deprecated)
  • Bug #2164: do not log errors on invalid jwt token
  • Bug #2166: convert input email to lowercase in request_registration() and request_password_change()
  • Bug #2167: Refactored client initialization for Yandex Tracker to use a function.
  • Bug #2168: Added a fork of open telegram sessions when the ticket was forked
  • Bug #2170: Returned ISSUE_TRACKER to settings
  • Bug #2171: prevent default_locale removal from locales list of the instance,...
  • Bug #2172: remove references to product, version and edition from filter and...
  • Bug #2174: The outputs of entire objects in the telegram logs of the bot have been removed to avoid the SynchronousOnlyOperation error.
  • Bug #2176: remove autocreation of whatsapp channel on starting container
  • Bug #2177: Converted last_reply_at from SlugRelatedField to DateTimeField to properly serialize datetime to a string
  • Bug #2178: Return of a valid error in the absence of an active AI provider
  • Bug #2181: Improved the paraphrasing tool for Yandex in order to correctly receive a response in the desired format.
  • Bug #2192: Added imap=None so that if there is an error in get_imap_connection, the finally block will work correctly and move get_smtp_connection to try..except for returning an error correctly.
  • Bug #2193: Now the ticket comments are sent only to tg channels with channel.route = ticket
  • Bug #2194: The satisfaction_score=OFFERED setting was made after the actual CSAT was sent.
  • Bug #2196: Replace settings.LOCALES with Instance.get_solo().locales
  • Bug #2197: Added filtering of tickets for connecting from the telegram bot by status
  • Bug #2199: Remove duplicate slash in /api/issue_trackers/
  • Bug #2207: Return a valid error if org_id and cloud_org_id are missing in yandextracker. Return an error when filling in cloud_org_id and org_id at the same time. Allowed editing auth_type at JiraTracker
  • Bug #2208: Set the default value of auth_type for Jira Trac ker, made the tracker_url field mandatory upon activation
  • Bug #2209: Added the removal of a skill from all conditions when a skill is deleted
  • Bug #2211: call Ticket update() instead of save() in manage_last_reply_and_comment_on_ticket signal
  • Bug #2220: Added blocking of request creation handlers in the telegram
  • Bug #2221: Correct switching of channel.route for the Telegram bot.
  • Bug #2229: The ticket is closed correctly if there are chat sessions and the closing messages are not duplicated.
  • Bug #2232: Removed deleted messages from sorting and display for last_message
  • Bug #2233: Removed the assignee for chat_session when merging
  • Bug #2235: Set the chat_status to OFFLINE by default.
  • Bug #2237: Removed duplicate chat closure notifications
  • Bug #2238: Do not create deleted chat attachments when closing a ticket
  • Bug #2240: Manage chat session assignee in post_save signal instead of pre_save
  • Bug #2241: Reworked chat merge mechanism to ensure only one chat remains in the ticket
  • Bug #2243: allow role change for users when near the limit of paid users that doesn't increase the number of them
  • Bug #2244: fix env.example syntax errors
  • Bug #2244: fix env.example syntax errors
  • Bug #2245: The telegram bot instance is always given and error handling is added when launching bots.
  • Bug #2247: Sort chats by started_at field when last_message is null
  • Bug #2252: Redone the condition for sending a notification about a filled CSAT
  • Bug #2255: Filtering non-public products of the article
  • Bug #2262: Removed sending notifications about the created ticket when the notification is turned off.
  • Bug #2263: Added 'translate' function to consumption choices
  • Bug #2268: Replaced LOCALES with VALID_LOCALES when working with AI
  • Bug #2269: The date and service user are set when classifying the ticket.
  • Refactor #2146: Redesigned getting the default locale now from Instance
  • Refactor #2270: Changed enable/disable urls for classifier