Can't Create Advanced Roadmap Plan due to "Your plan contains more than 100 projects" error
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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
When attempting to create a plan in Advanced Roadmaps plan creation fails with the following error:
Your plan contains more than 100 projects. Remove issues sourcess or use the section below to refine your plan.
Environment
Jira Data Center 9+
Diagnosis
In addition to the error during plan creation, the following error will be present in the application logs (atlassian-jira.log*)
/rest/jpo/1.0/plan/setup/projects [c.a.r.c.r.provider.exception.DefaultExceptionMapper] java.lang.RuntimeException: Could not find suitable distance for rank.
com.atlassian.rm.common.env.EnvironmentServiceException: java.lang.RuntimeException: Could not find suitable distance for rank.
..........
Caused by: java.lang.RuntimeException: Could not find suitable distance for rank.
To further diagnose this issue, you will want to run the following database queries:
SELECT * FROM "AO_60DB71_LEXORANK" WHERE "TYPE" IN (0, 2);
SELECT * FROM "AO_60DB71_LEXORANK";
The output will likely look something like this where the Rank table has 2 minimum and maximum markers:
FIELD_ID | ID | ISSUE_ID | LOCK_HASH | LOCK_TIME RANK | TYPE | BUCKET | |
-859340285902835 | 27 | -9223372036854775808 | NULL | NULL | 0|000000: | 0 | 0 |
-859340285902835 | 28 | -9223372036854775808 | NULL | NULL | 0|000000: | 0 | 0 |
-859340285902835 | 29 | 92233772036854775807 | NULL | NULL | 0|zzzzzz: | 2 | 0 |
-859340285902835 | 30 | 92233772036854775807 | NULL | NULL | 0|zzzzzz: | 2 | 0 |
Solution
take a database backup in case a rollback in necessary.
Please test this procedure in a test instance before applying it in your production instance. Due to database modifications, please make sure to- Stop Jira on all nodes
- Backup the database
- Run the SQL statement to remove both the minimum marker with the highest ID and the maximum marker with the highest ID. In the above example, this is IDs 28 and 30:
delete from AO_60DB71_LEXORANK where ID in ('28','30');
- Restart Jira on all nodes
- Perform a Full/Locked Re-index
- After the re-index is completed, please access the Lexorank Management page and trigger re-balance.
- Go to Administration ( ) →System → Lexorank Management
- Once the re-balance is done, please check to see if the issue is resolved and the Advanced Roadmaps plan can be created.