story status cannot be edited#767

Subscribe to story status cannot be edited 1 post, 1 voice

 
Avatar Bart De Gruyter 1 post #2014

When I tried to drag and drop a bunch of stories on a release in the tree view
I found the following in the logfiles:

2008-08-04 11:56:31,065 [/] ActiveRecord::StatementInvalid (ActiveRecord::ActiveRecordError: Duplicate entry ‘1044’ for key 1: INSERT INTO the_talent_box_card_versions (`id`,`card_id`,`version`,`project_id`,`number`,`name`,`description`,`created_at`,`updated_at`,`created_by_user_id`,`modified_by_user_id`,`comment`,`system_generated_comment`,`card_type_name`,`has_macros`,`cp_accepted_on`,`cp_added_on`,`cp_analysis_completed_on`,`cp_days_open`,`cp_defect_status`,`cp_enddate`,`cp_startdate`,`cp_estimate_planning`,`cp_story_size`,`cp_feature_feature_card_id`,`cp_feature_feature_1_card_id`,`cp_fixed_on`,`cp_owner_user_id`,`cp_planning_release_card_id`,`cp_planning_sprint_card_id`,`cp_planning_story_card_id`,`cp_planning___task_card_id`,`cp_priority`,`cp_reported_on`,`cp_status`,`cp_task_estimate`,`cp_task_status`,`cp_testing_completed_on`,`cp_testing_started_on`,`cp_actual`,`cp_comment`,`cp_customer`,`cp_sprint`)
VALUES(1044,975,4,22,6,’qc gilissen’,’h3. Acceptance Criteria\r\n\r\nh3. Dependencies\r\n\r\nh3. Out of Scope’,’2008-08-04 09:48:03’,’2008-08-04
09:56:31’,2,2,NULL,NULL,’Story’,0,NULL,’2008-08-04’,NULL,NULL,NULL,NULL,NULL,’4’,NULL,NULL,NULL,NULL,NULL,898,899,NULL,NULL,’3’,NULL,’New’,NULL,NULL,NULL,NULL,NULL,’J/T/M’,’EEP’,’10’)):=

The support team informed me that the above could be related to a bulk update failure (in the past) and they explained how to find this out. I could not verify this myself as I had already changed the original data. I copy it in here because it might be useful for anyone in the future.

All credits go to Reddy Dheeraj for this response:

For each project on your Mingle instance run the following queries:
select max(id) from <project_id>_cards;
select max(id) from <project_id>_card_versions;

Where <project_id> is the actual project id. E.g., for the “talent_box”
project, the SQL statements would be:
select max(id) from talent_box_cards;
select max(id) from talent_box_card_versions;

Note the maximum id that you find for each cards and card_versions tables.

Then run this SQL:
select * from sequences where name in (‘cards’, ‘card_versions’);

The last_value for each column should match the maximum id for the card and
card_versions tables you queried above. If they don’t then the problem can
be fixed by doing the following - Before you consider either option, please backup your database.

1) Restore the Mingle database from a backup made before you started
noticing this issue . I can understand that this is not always an option.
OR
2) Export the talent_box project to a .mingle file, by using the “Export
project” option. Remove the talent_box project from your instance (can be
done by Mingle Admin). Import the .mingle file to re-create the talent_box
project. Since the sequences are recreated on project import, this should
fix the problem.

From talking with the support team I found out that the bulk update issue might be related to the fact that we are using mingle with mysql. In the future I plan to reinstall mingle and use postgres 8.1 or 8.2. If this problem reappears I will update this topic.

Kind regards,
Bart De Gruyter