java.lang.Object
com.riadalabs.jira.plugins.insight.services.progress.model.ProgressStep
All Implemented Interfaces:
Serializable

@PublicApi public class ProgressStep extends Object implements Serializable
Indicate a sequential step in an overall progress. Two steps can not be executed in parallel that is the distinction by a step less process or a process with steps
Since:
5.0
Author:
Ola Melin
See Also:
  • Constructor Details

    • ProgressStep

      public ProgressStep(String description, int totalWorkUnits, String actor)
    • ProgressStep

      public ProgressStep(String description, String currentWorkDescription, int totalWorkUnits, String actor)
    • ProgressStep

      public ProgressStep(Progress.Status status, Progress.Result result, AtomicInteger totalWorkUnits, AtomicInteger currentWorkUnits, String currentWorkDescription, com.riadalabs.jira.plugins.insight.services.progress.result.ProgressResult resultData, String resultMessage, Date startDate, Date finishedDate, String actor, String stepDescription, boolean isPlaceholder)
  • Method Details

    • createPlaceholder

      public static ProgressStep createPlaceholder(String actor)
    • setCurrentWorkUnits

      public int setCurrentWorkUnits(int currentWorkUnits)
    • incrementCurrentWorkUnits

      public int incrementCurrentWorkUnits(int incrementCurrentWorkUnits)
    • incrementCurrentWorkUnits

      public void incrementCurrentWorkUnits()
    • decrementTotalWorkUnits

      public int decrementTotalWorkUnits(int ignoredWorkUnits)
    • getStepDescription

      public String getStepDescription()
    • isPlaceholder

      public boolean isPlaceholder()
    • getProgressInPercent

      public int getProgressInPercent()
      Returns the progress in % (based on current work / total work)
    • setTotalWorkUnits

      public int setTotalWorkUnits(int totalWorkUnits)
    • getTotalWorkUnits

      public int getTotalWorkUnits()
    • getCurrentWorkUnits

      public int getCurrentWorkUnits()
    • setCurrentWorkDescription

      public void setCurrentWorkDescription(String currentWorkDescription)
    • getCurrentWorkDescription

      public String getCurrentWorkDescription()
    • getStatus

      public Progress.Status getStatus()
    • getResult

      public Progress.Result getResult()
    • getStartDate

      public Date getStartDate()
    • getFinishedDate

      public Date getFinishedDate()
    • getActor

      public String getActor()
    • setPlaceholder

      public void setPlaceholder(boolean placeholder)
    • calculateEstimatedFinishDate

      public Date calculateEstimatedFinishDate()
      Calculates the estimated finish Date based on: startDate, progressInPercent, updatedDate. The usage of this calculation is subject to a few assumptions and must be used with care. 1) The status must be: IN_PROGRESS 2) Will not calculate a value unless we have a certain amount of progress. 3) 1 < totalWorkUnits 4) must have a start date. 5) Must have progress.
      Returns:
      If certain conditions are met, a calculated: estimated finish date is returned, null otherwise.