# Update v5.12.x
# Instruction

:::danger
IMPORTANT! Before updating to v5.12.x, you must have a version of Swarmica not lower than [v5.11.x](https://support.swarmica.com/article/ru/1571 "v5.11.x")

It is important to perform updates sequentially: if the Swarmica version is lower than required, for example, v5.3.x, then you first need to update to v5.4.x, then to v5.5.x, and so on.
:::

### Preparation

To update, check that the version is set in the .env configuration file:

```bash
~# grep VERSION .env
SW_FRONTEND_VERSION=v5.12.1
SW_BACKEND_VERSION=v5.12.1
SW_HELPCENTER_VERSION=v5.12.1
```

### Update

:::tip
There will be a service interruption for several minutes, it is recommended to perform the update during hours when system usage is minimal
:::

Perform the update with a system restart:

```bash
docker compose pull
docker compose down
docker compose up -d
```

### After the update

After all containers start and the service becomes available via the web interface, perform post-upgrade steps:

1. Run the post-start command to update static files, search indexes and perform other necessary procedures:

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

2. Run the command to migrate the permissions model to custom fields:

```bash
docker exec --env-file .env -it swarmica-django-1 python manage.py migrate_cf_permissions
```

3. Run the purge of unused data:

```bash
docker system prune -a
```

:::tip
IMPORTANT! Make sure that all containers have started successfully before running this command
:::

### New feature flags

`__ai_ticket_summary` - for AI providers that support this function, enables the ability to summarize tickets

`__delete_comment_attachments` - allows support staff with the role of Agent, Manager or Administrator to delete attached files in tickets

`__private_attachments` - enables additional protection mode for attached files, preventing their preview and access via a direct link without authorization. Additionally, you can adjust the degree of blurring of the thumbnails of such files using the env variable `PRIVATE_THUMBNAIL_BLUR_RADIUS` (default is 12 pixels, to disable - specify 0)

:::note
[More details](https://support.swarmica.com/article/ru/596-ficha-flagi-features-vozmozhnost-vklyuchat-i-vyklyuchat-bloki-funkcij-v-swarmica.html) about adding/removing feature flags
:::

## ✨ **Key improvements**

🧠 **AI functions:**

* Now you can get a complete summary of all correspondence in a ticket in one click, as well as recommendations for improving service quality

🔐 **Security and privacy:**

* Expanded options for setting access to Custom fields: now you can specify the ability to view and edit a particular field for each role
* Added high security mode for attached files - now there is no direct link to them (enabled by the feature flag __private_attachments)
* Added the ability to 'soft' and fully delete attached files via the web interface

🎯 **Filters and bulk actions:**

* Added the ability to bulk edit skills in tickets
* Added the ability to set skills through Macros
* Added the ability to filter tickets and users without skills (operator *ISNULL*)

⚙️ **Autoclassification and ticket handling:**

* Added the ability to disable automatic assignment when creating a ticket
* Added an optional email notification to the responsible person that the ticket has gone to the status *Solution provided*
* For attached media files, you can blur the preview thumbnails

🔌 **Integrations and ecosystem:**

* For outgoing webhooks, the option to configure action parameters on error has been added: the number of retries, the time between retries, HTTP statuses for retries
* For outgoing webhooks, the ability to pass an idempotency key in the request body or headers has been added
* Added the ability to check authorization settings in AI providers

📚 **Working with articles and knowledge base:**

* Added the ability to copy part of an article from the KCS widget to the clipboard or paste it directly into a response to a client using drag and drop
* For authorized employees, archived articles are displayed in the knowledge base, marked as possibly outdated
* Added support for *cmake* and *Makefile* languages in the article editor code block
* Added a customizable email notification when unflagging an article for revision

🎨**General improvements:**

* Added the ability to set default roles and states for email notifications, as well as apply new settings to all system users en masse
* Added a panel collapse/expand indicator in the ticket
* Added the ability to reset list sorting by re-clicking the column name
* Added the ability to choose Categories of templates in the quick insert template response window
* Added the ability for clients to independently transfer tickets from status New to Solved
* Added a dynamic browser tab title for all system sections

### 🔧Issues fixed:

* Extra HTML/XML markup in tickets created via email
* Resetting the display of the KCS article body in the ticket