> For the complete documentation index, see [llms.txt](https://docs.meta-inf.hu/email-this-issue/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.meta-inf.hu/email-this-issue/email-this-issue-for-jira-server-data-center/faq/faq/how-to-fix-issues-with-a-corrupt-index-state.md).

# How to fix issues with a corrupt index state

## Problem <a href="#fixissueswithcorruptindexstate-problem" id="fixissueswithcorruptindexstate-problem"></a>

Subtasks and linked issues cannot be deleted.

Email This Issue version 8.1.1 introduced a bug which made impossible to delete subtasks and linked issues. After a failed attempt, these issues could not be deleted, as their internal state was corrupt. It means these issues and subtasks were marked “deleted” but they were not removed from Jira. They could not be deleted even after downgrading of the app.

## Solution <a href="#fixissueswithcorruptindexstate-solution" id="fixissueswithcorruptindexstate-solution"></a>

The solution is to fix the issue state directly in the Jira database

1\. Backup your Jira instance.

2\. Execute this SQL UPDATE statement in your Jira database

```
update issue_version set DELETED = 'N' where DELETED ='Y' and ISSUE_ID in (Select ID from jiraissue);
```

{% hint style="info" %}
**Note**: You might need to adapt the SQL statement to your database type.
{% endhint %}

{% hint style="success" %}
**Result**: Jira does not have to be shutdown or be re-indexed.
{% endhint %}
