Class RepairProcess
java.lang.Object
com.atlassian.greenhopper.service.lexorank.repair.RepairProcess
This class is responsible for repairing LexoRank fields in Jira issues.
-
Constructor Summary
ConstructorsConstructorDescriptionRepairProcess
(LexoRankDao lexoRankDao, com.atlassian.jira.issue.IssueManager issueManager, IssueIndexService issueIndexService, Long lexoRankFieldId, RepairConfiguration configuration) Creates a new repair process. -
Method Summary
Modifier and TypeMethodDescriptionRepairs the LexoRank field with the given ID.
-
Constructor Details
-
RepairProcess
public RepairProcess(LexoRankDao lexoRankDao, com.atlassian.jira.issue.IssueManager issueManager, IssueIndexService issueIndexService, Long lexoRankFieldId, RepairConfiguration configuration) Creates a new repair process.- Parameters:
lexoRankDao
- the DAO used to access LexoRank dataissueManager
- the manager used to access issue dataissueIndexService
- the service used to reindex issueslexoRankFieldId
- the ID of the LexoRank field to repairconfiguration
- the configuration used to control the repair process
-
-
Method Details
-
repair
Repairs the LexoRank field with the given ID. This repair process is triggered by re-ranking an issue, and observing the ranks of issues neighbouring the re-ranked issue. The repair process will attempt to correct the ranks of issues by:- Determining the range of the local repair,
- Correcting the ranks of issues in the range, using shorter ranks,
- Reindexing the issues that were updated during the repair process.
- Parameters:
prevIssueRank
- the rank of the issue before the issue that triggered the repairnextIssueRank
- the rank of the issue after the issue that triggered the repair- Returns:
- the result of the repair process
-