Page tree
Skip to end of metadata
Go to start of metadata

Problem

A new data structure was introduced in version 3.0.0 of the Jenkins Integration for Jira Server add-on. In this new data structure a custom primary key is used that had a string length constraint, and this constraint is not correctly mirrored by a foreign key relation.

This is a know issue of the ActiveObject framework this add-on is using (see AO-547), and the only solution is to remove the string length constraint on the primary keys.

Version 3.0.1 aims to solve this problem by removing the string length constraint on the primary keys used, but this may be blocked by the database system your Jira instance is connected to.

Solution

There is a workaround that allows you to fix the problem by resetting the ActiveObjects model upgrade marker in the database, triggering the upgrade tasks to be executed again when Jira is started. This second run should then complete the model migration.

You will require database access in order to use this workaround!

To fix this you will need to manually change the data within the database to correct the site data.

  1. Shutdown Jira
  2. Connect to you Jira database using your favourite SQL tooling that is also appropriate for the database you have.
  3. (warning) Create a backup of your database!
  4. Once connected locate the table AO_[HASH]_SITE_MAPPING, there should only be a single table that matches this name.
  5. Note the table hash HASH, for example 3FB43F, since we will be needing this
  6. Drop the tables of the new data model, these include: AO_[HASH]_SITES, AO_[HASH]_JOBS, AO_[HASH]_BUILDS, AO_[HASH]_TEST_RESULTS, AO_[HASH]_CHANGE_SETS, AO_[HASH]_ISSUE_LINKS
  7. Next we may need to reset the Active Objects upgrade marker for the plugin. First execute the first query below to see if there is a marker for this Active Objects module. If there is then note the ID and execute the second query as well.

    • SELECT * FROM PROPERTYENTRY WHERE PROPERTY_KEY = 'AO_[HASH]_#'

    • UPDATE PROPERTYSTRING SET PROPERTYVALUE = '0' WHERE ID = [ID]

  8. The data model has now been reset, and Jira can be started again.
  9. If the add-on was still installed and enabled, then the upgrade of the model should kick-in automatically, otherwise you can install, or enable, the add-on with Jira to trigger the data model upgrade.