#549: Обновление v4.4.x

Инструкция

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

Подготовка

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

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

Обновление

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

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

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

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

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

1. Запустите команду выставления полей, связанных с последним комментарием, добавленным в тикет:

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

2. Запустите команду миграции настроек SMTP Relay из перменных окружения в базу данных, чтобы в дальнейшем стало возможным менять эти настройки через интерфейс:

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

3. Запустите команду оптимизации изображений для пользовательских аватарок:

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

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

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

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

5. Запустите команду подсчета кол-ва задач, связанных с заявками:

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

6. Запустите команду подсчета исторических значений метрики Issue Reduction (в примере на 500 дней назад):

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

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

docker system prune -a

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

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

Frontend

  • Feature #1254: Add video support in articles
  • Feature #1436: Supported viewers for Article
  • Feature #1458: Supported 'ext_id' & 'identity' in TicketChannel
  • Feature #1461: Supported 'issue_count' in ticket filters
  • Feature #1464: Show internal body match in article search snippet
  • Feature #1471: New way to configure and test Email Channel settings
  • Feature #1474: Added SMTP relay management to the settings
  • Feature #1478: Add delete video button in article editor
  • Feature #1480: Update Swarmica logo
  • Feature #1481: Added api request for licenses when toggling dropdown
  • Feature #1482: Changed test method for SMTP Relay
  • Feature #1487: Time spent in ticket comments
  • Feature #1488: Mandatory time spent in ticket comments
  • Feature #1495: Ordering -date for ticket time logs table
  • Feature #258: Add tooltip for ticket comment editor toolbar
  • Feature #671: Article internal body
  • Feature #813: Allow soft link breaks in ticket comment editor in lists
  • Bug #1078: Update ticket comment editor to Quill v2
  • Bug #1385: Fixed validation for 'number' type in RunScriptForm
  • Bug #1426: show no results widget when no filters in lists
  • Bug #1456: Escape angle brackets when creating an article from a comment
  • Bug #1457: Tweak the way Markdown directives are supported in articles
  • Bug #1462: Fixed license translation for 'ru' locale in cf
  • Bug #1465: fix overlay-trigger height in article snippet
  • Bug #1467: Fixed style for switches in dark theme
  • Bug #1468: Fix user initials on avatar
  • Bug #1473: Fixed navigation on Articles page
  • Bug #1475: Fixed ImageViewer after changing ticket comments
  • Bug #1476: Fixed display of communication channels in the ticket
  • Bug #1477: Fix comment template insertion
  • Bug #1486: Expanded ticket comments form for customers
  • Bug #1490: Fixed translation title of SMTP configuration form
  • Bug #1492: Fix image pasting in Quill
  • Bug #1493: prevent delete inner body comment when change only external body
  • Bug #1494: Added validation for fields of email channels in edit form
  • Bug #1496: fix bug send ticket comment without time spent for customer and customer admin
  • Devops #1459: Updated Vite to v6.2.0.
  • Devops #1463: npm audit
  • Devops #1466: Update TypeScript
  • Devops #1469: Forbid default import from lodash library
  • Devops #1483: remove npm-check-updates package
  • Devops #1491: Fixed bundle size by adding strictRequires = auto to vite build options
  • Devops: Bump version to v4.4.0
  • Devops: add bundle size analyzer
  • Locales #1443: change license key in transcription to key
  • Locales #1472: change segments description
  • Locales #1479: fix kb footer ru help
  • Refactor #1440: Refactored article routing and article pages
  • Refactor #1453: Update ESLint rules

Backend

  • Feature #1936: forbid merging billmanager users
  • Feature #1955: add information about identity in ticket channel api
  • Feature #2028: stored context for runtime-scripts
  • Feature #2049: Added SMTP configuration for EmailChannel and implemented support for TLS or unencrypted connections in collect_imap_emails.
  • Feature #2052: Implemented the SMTPRelay entity with API endpoints and added support for testing SMTP configuration. Additionally, provided management command for creating and updating SMTPRelay instances.
  • Feature #2053: Implemented logic and API for testing IMAP/SMTP in EmailChannel.
  • Feature #2054: Multiple conditions for trigger exclude option
  • Feature #2056: Added the ability to disable API method hiding based on a flag.
  • Feature #2058: add caching for user and empoyee api with proper cache invalidation
  • Feature #2059: add index for status field on ticket table
  • Feature #2060: Added avatar resizing for the user on update.
  • Feature #2061: do not use additional filters and annotations on queryset when exporting articles
  • Feature #2062: Added SMTPRelay to admin-panel
  • Feature #2064: Added avatar cropping to a square and fixed image retrieval from social networks.
  • Feature #2065: Added the ability to disable WebSocket for Articles based on a flag.
  • Feature #2066: add cache on group and license retrieve
  • Feature #2070: Added indexes for aggregated and flat metrics
  • Feature #2074: Separated SMTP Relay testing methods
  • Feature #2075: add cache for organization retrieve api, clear cache when changing identities for user, sla for organization and license and custom fields for user, organization and license
  • Feature #2078: Added timelog binding to the ticket comment
  • Feature #2079: Added support for unlicensed feature flags
  • Feature #2080: Added documentation for timelogs
  • Feature #2081: Attachments for comment templates similar to comment attachments have been added; encryption and smtp_encryption have been converted to the same type, and default values have also been added (as on the model)
  • Feature #2082: Separated SMTP/IMAP testing API into methods for connection verification before saving and for message sending
  • Feature #2083: Skipped address used as EmailChannel mailbox.
  • Feature #2084: Changed the date field from date type to datetime for timelog
  • Feature #2085: Adjusted email settings usage to be sourced only from SMTP Relay or Email Channel instead of system-wide settings and fixed verbose_name for SMTPRelay fields.
  • Feature #2086: Added sorting by the "date" field for timelogs
  • Feature #2093: The feature flag FEATURES_SMTP_EMAIL_CHANNEL has been made unlicensable.
  • Feature billmanager6#27: return 409 http status instead of 500 when setting csat on closed ticket in billmanager api
  • Bug #2024: Added an error and error handling when launching the VK bot.
  • Bug #2029: Decreased error level up to Warning for users with incorrect emails...
  • Bug #2035: KCS Tree nodes completion calculation now based on aggregated metrics
  • Bug #2044: Added category removal from filter conditions when it is deleted
  • Bug #2048: Renamed the argument value to query for Yandex issue search to avoid errors.
  • Bug #2055: Skip triggers with broken conditions in run_triggers crontask
  • Bug #2063: Fixed an issue where an anonymous user made a request in a context where CustomField.get_all_visible_fields_for_user is used.
  • Bug #2068: Added conversion of base64 email message body to text with validation and correction of its proper length.
  • Bug #2071: Added timeout setting for SMTPRelay and EmailChannel; properly send EmailChannel instead of BaseChannel to validation function in EmailChannel serializer on update
  • Bug #2072: Renamed email encryption NOT_SET -> NONE
  • Bug #2076: Added 'aggregated_metrics_ir' to 'aggregated_metrics'
  • Bug #2077: Added conversion of datetime to date in budget calculation for the CPI metric and reworked retrieval of deflected_sessions for the CS metric directly from the VD metric.
  • Bug #2087: SMTP verification is now performed only when creating an email channel with protocol = smtp, and the type of the smtp_port field has been replaced with a string in the example.
  • Bug #2088: Removed smtp_* field validation when creating/update an EmailChannel and
  • Bug #2089: Removed sending of publicCommentAdded and internalCommentAdded events to the comment author via socket.
  • Bug #2092: Added the ability to edit smtp_* fields on the IMAP channel, fixed the feature flag check FEATURES_SMTP_EMAIL_CHANNEL to apply only for protocol=smtp.
  • Bug billmanager6#28: send requester for ticket alongside the comment author
  • Bug: fix typo in getting employee cache ttl
  • Devops #2045: Added INSECURE_HTTP_SERVER check to disable HTTPS security
  • Devops #2067: Added profiling configuration for Sentry.
  • Refactor #1965: Converted the Ir metric to a flat format, reworked the use of the t_links aggregation to the t_links field, and also added a periodic task for calculating t_links_last_months.
  • Refactor #2043: Moved Article.jira_count from annotation to Ticket.issue_count and also added issue count calculation for Ticket.
  • Refactor #2046: Fixed the N+1 issue for Article, Organization, License, and User by refactoring custom_fields retrieval from CFField to CFFieldPrefetched.