Class UpgradeTask_Build71001

All Implemented Interfaces:
UpgradeTask, com.atlassian.upgrade.spi.UpgradeTask

public class UpgradeTask_Build71001 extends AbstractDelayableUpgradeTask
Deletes the version association for any issues that have a reference to a non-existent project version.
Since:
v7.0.1
  • Constructor Details

    • UpgradeTask_Build71001

      public UpgradeTask_Build71001(DbConnectionManager dbConnectionManager)
  • Method Details

    • getBuildNumber

      public int getBuildNumber()
      Returns:
      The build number that this upgrade is applicable to
    • isDowngradeTaskRequired

      public boolean isDowngradeTaskRequired()
      Description copied from interface: UpgradeTask
      Flag to claim whether this upgrade task needs an explicit downgrade task to reverse the data changes in Jira-Server. Jira-Cloud always needs corresponding downgrade task.

      If a downgrade is a simple no-op then return false, and JIRA will ignore these changes during a downgrade.

      If you need to actually undo the changes made here then declare true and add a Downgrade Task to the bug fix branch.

      Returns:
      true if an actual Downgrade Task must run to revert these changes, false if downgrade is a no-op.
    • getShortDescription

      public String getShortDescription()
      Description copied from interface: UpgradeTask
      A short (<50 chars) description of the upgrade action
    • doUpgrade

      public void doUpgrade(boolean setupMode) throws Exception
      Perform an upgrade task that will delete any association from the 'NodeAssociation' table that is between an issue and a non-existent version. This is necessary because of a bug--reported in JRA-22351--where versions were removed from the database before the issue's version associations had a chance to be deleted. This caused JQL searches like 'fixVersion is EMPTY' to be incorrect.
      Parameters:
      setupMode - Indicating this upgrade task is running during set up.
      Throws:
      Exception