Not a patch revision id error when opening a review
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
Symptoms
The following appears in the atlassian-fisheye.log
:
1
2
3
4
5
6
7
8
javax.servlet.ServletException - javax.el.ELException: java.lang.IllegalArgumentException: Not a patch revision id: 0:T
javax.el.ELException: java.lang.IllegalArgumentException: Not a patch revision id: 0:T
java.lang.IllegalArgumentException: Not a patch revision id: 0:T
Not a patch revision id: 0:T
Cause
This may happen after an upgrade from Fisheye/Crucible 2.x to 3.x, if the database schema was already upgraded and a review was created with the old version, because the format of the column cru_revision
in the table cru_revision
has changed for patches from 0:F
to 0:0:F
.
This may relates with org.hibernate.PropertyAccessException when opening a review.
Resolution
Check the affected records with the following command:
1 2 3
SELECT * FROM cru_revision WHERE cru_source_name like 'PATCH:%' and cru_revision NOT LIKE '%:%:%';
Run the following query to adjust the records:
For MySQL:
1 2 3
update cru_revision set cru_revision = concat(substr(cru_source_name, 7), ':', cru_revision) where cru_source_name like 'PATCH:%' and cru_revision NOT LIKE '%:%:%';
For Oracle:
1 2 3
update cru_revision set cru_revision = substr(cru_source_name, 7)||':'||cru_revision where cru_source_name like 'PATCH:%' and cru_revision NOT LIKE '%:%:%';
For SQL Server 2005/2008:
1 2 3
update cru_revision set cru_revision = substring(cru_source_name, 7, len(cru_source_name)) + ':' + cru_revision where cru_source_name like 'PATCH:%' and cru_revision NOT LIKE '%:%:%';
Was this helpful?