public interface

UpgradeTask

com.atlassian.jira.upgrade.UpgradeTask
Known Indirect Subclasses

Summary

Nested Classes
enum UpgradeTask.ScheduleOption  
class UpgradeTask.Status Track status of a task this session, if isTaskDone(String) returns true you don't need to do it again. 
Public Methods
@Nullable String dependsUpon()
Return the Upgrade task id of another upgrade task that must be run prior to this task.
void doUpgrade(boolean setupMode)
Perform the upgrade.
String getBuildNumber()
Collection<String> getErrors()
Return any errors that occur.
UpgradeTask.ScheduleOption getScheduleOption()
Return when this upgrade task can be scheduled.
String getShortDescription()
A short (<50 chars) description of the upgrade action
boolean isDowngradeTaskRequired()
Flag to claim whether this upgrade task needs an explicit downgrade task to reverse the data changes.

Public Methods

@Nullable public String dependsUpon ()

Return the Upgrade task id of another upgrade task that must be run prior to this task.

public void doUpgrade (boolean setupMode)

Perform the upgrade.

Parameters
setupMode Indicating this upgrade task is running during set up.
Throws
Exception

public String getBuildNumber ()

Returns
  • The build number that this upgrade is applicable to

public Collection<String> getErrors ()

Return any errors that occur. Each entry is a string.

public UpgradeTask.ScheduleOption getScheduleOption ()

Return when this upgrade task can be scheduled.

public String getShortDescription ()

A short (<50 chars) description of the upgrade action

public boolean isDowngradeTaskRequired ()

Flag to claim whether this upgrade task needs an explicit downgrade task to reverse the data changes.

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.