# Changing group in closed and solved tickets
# Instructions

1. Log in to Swarmica as Administrator

2. Create a script in **Settings - Scripts** for the **Administrator** role

![](https://support.swarmica.com/attachments/V/S/VSPOQ8MnmOJN1glM_a/изображение.png)

3. Add the script [set_group_for_tickets.py](https://support.swarmica.com/attachments/e/V/eVCEft1WJGOlCiMl_a/set_group_for_tickets.py)

4. Set up **Web form settings**:

For the list of tickets:

```txt
Name: List of tickets
API name: tickets
Type: text field
Required field: on
Read-only: off
```

It should look like this:

![](https://support.swarmica.com/attachments/T/B/TB_V_Ztfh_XWf063_a/изображение.png)

For selecting a group:

```txt
Name: Select group
API name: group_uid
Type: Dropdown list
Required field: on
Read-only: off

# Next, you need to enter options for the list of groups in the format:

Name: <GROUP NAME>
API name: <GROUP UID>
```

It should look like this:

![](https://support.swarmica.com/attachments/m/K/mKc_oU2yc-VHCwBQ_a/изображение.png)

5. Click **Save**

It should look like this in the end:

<img height="195" width="876" src="https://support.swarmica.com/attachments/7/d/7d5m9ANiWfxaqKcD_a/изображение.png" />

6. In the Web form on the right, enter the list of tickets separated by commas, select the group to which the tickets will be assigned, and click **Send**:

<img height="269" width="556" src="https://support.swarmica.com/attachments/l/0/l0DEsdDCpPblMMzh_a/Screenshot_2026-09-02_at_14.01.37.png" />

### Troubleshooting

You can track the process in the celeryworker container log before running the script:

```bash
docker logs swarmica-celeryworker-1 -f --tail 0
```