Error after Jira Upgrade

benno February 12, 2014

We upgraded our Jira from 5.1 to 6.1.7 today.
After the reinstallation of ictime we get the following error message in the catalina log:

2014-02-13 19:35:59,530 http-8080-4 ERROR tomcat 1175x5637x1 7jnnsb 127.0.0.1 /secure/admin/IcTimePluginConfigure.jspa [net.java.ao.sql] Exception executing SQL update <ALTER TABLE AO_9B23C2_TIME_ENTRY CHANGE COLUMN WORKLOG_ID WORKLOG_ID BIGINT NOT NULL>
java.sql.SQLException: Data truncated for column 'WORKLOG_ID' at row 29

Is there any step i miss in the update procedure, or is there a bug?

ictime 2.2.0 to 3.1.4 update

1 answer

1 accepted

0 votes
Answer accepted
Tobias Reibling
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 24, 2014

This had already been resolved via email. However, just to give the respective information to other users who might stumble into the same problem:

WORKLOG_ID in table AO_9B23C2_TIME_ENTRY must not be nullable in newer ictime versions. ictime 2.2 did not know this setting. When doing the update to a newer ictime version, the query to change this setting (<ALTER TABLE AO_9B23C2_TIME_ENTRY CHANGE COLUMN WORKLOG_ID WORKLOG_ID BIGINT NOT NULL>) can't be executed because there are time entries (= enhanced data for JIRA work logs) with WORKLOG_ID=null in your database. This could happen in older ictime installations; such time entries can be deleted as they have no function and are definitely not displayed or used.

Problem can be solved by doing the following queries directly in the database:

1. Backup some data, just in case ...
create table AO_9B23C2_TIME_ENTRY_SAVE select * from AO_9B23C2_TIME_ENTRY where WORKLOG_ID is NULL;

2. Delete time entries where WORKLOG_ID is NULL
delete from AO_9B23C2_TIME_ENTRY where WORKLOG_ID is NULL;

3. Make the configuratio change for table AO_9B23C2
ALTER TABLE AO_9B23C2_TIME_ENTRY CHANGE COLUMN WORKLOG_ID WORKLOG_ID BIGINT NOT NULL;

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events