Unable to turn off "Allow unassigned issues" on Jira due to archived issues
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
As an admin, when attempting to to disable the "Allow unassigned issues" you may be faced with an error message stating that there are issues unassigned and you cannot turn off the option.
While this may be caused by issues which you're unable to see due to lack or permission and regular (non-archived issues) without an assignee, this article is focused on the archived issues without an assignee as the cause.
Environment
Jira 9.4.14
Diagnosis
First, ensure no unassigned non-archived issues still exist by running this JQL on Issue Navigator: "assignee is empty
"
If there are any results, you'll need to set values first. This article covers the issues that are archived and thus not found on JQL search.
After setting an Assignee for those, on the System > General Configuration > Edit Settings, the following message is displayed:
Cannot turn off "Allow unassigned issues" as there are 1 issue(s) that are unassigned. Please assign these issues before disabling Unassigned Issues. N.B. You may not have permissions to view all of these issues
The number may be higher depending on the number of archived issues on your instance.
To find the archived issues you may:
Navigate to
<JIRA_BASE_URL>/secure/BrowseArchivedIssues!default.jspa
to restore them and set assignee values.Directly on the database, you can run this query to find them:
1
p.pkey, ji.issuenum from jiraissue ji join project p on p.id=ji.project where assignee is null;
Cause
Jira will now allow the "Allow unassigned issues" to be disabled unless all issues have an assignee defined, including archived issues.
Solution
Option 1 - restore and define the assignee
You may manually un-archive the issues that have an empty assignee.
Option 2 - set the assignee directly on the database
All queries were written and tested on PostgreSQL. Other DB products might need syntax adjustments and your setup might require database name and schema to be provided for table names.
If your database is case sensitive, and any query returns an error related to table not found, please observe if in the database the queried table name is capitalized or in lower case.
As an alternative, it's possible to set the assignee directly in the database but this will not generate any change history entries. First you would need to find a user to set the value to. This must be a value that exists on "app_user" user_key column. Confirm it by running this query with the chosen user.
1
select * from app_user where user_key = 'XXXX';
Find and save the output of this query as a backup:
1
select * from jiraissue where assignee is null;
Then you'll update these issues to have an assignee selected earlier:
1
update jiraissue set assignee='XXXX' where assignee is null;
Was this helpful?