com.atlassian.jira.plugin.report.impl
Class TimeTrackingReport

java.lang.Object
  extended by com.atlassian.jira.plugin.report.impl.AbstractReport
      extended by com.atlassian.jira.plugin.report.impl.TimeTrackingReport
All Implemented Interfaces:
Report

public class TimeTrackingReport
extends AbstractReport


Field Summary
 
Fields inherited from class com.atlassian.jira.plugin.report.impl.AbstractReport
descriptor
 
Constructor Summary
TimeTrackingReport(VersionManager versionManager, ApplicationProperties applicationProperties, IssueManager issueManager, ConstantsManager constantsManager)
           
 
Method Summary
 java.lang.String generateReportExcel(ProjectActionSupport action, java.util.Map reqParams)
          By default, will throw an UnsuppportedOperationException as reports don't support Excel by default.
 java.lang.String generateReportHtml(ProjectActionSupport action, java.util.Map reqParams)
          Generate the report's HTML - usually from the Velocity resource named "html".
 int getAccuracyPercentage()
           
 java.lang.String getAccuracyTot()
           
 int getCompletionPercentage()
           
 long getDurationInMinutes(long seconds)
           
static long getLongAccuracy(long originalEst, long timeEst, long timeSpent)
           
static int getLongAccuracyPercentage(long originalEst, long timeEst, long timeSpent)
           
 java.lang.String getNiceAccuracy(org.ofbiz.core.entity.GenericValue issue)
          Generate a nice accuracy string
 java.lang.String getNiceTimeDuration(org.ofbiz.core.entity.GenericValue issue, java.lang.String field)
           
 java.lang.String getOriginalEstTot()
           
 java.util.Map getParams(ProjectActionSupport action, java.util.Map reqParams)
           
 java.util.Collection getProjectVersionIds(org.ofbiz.core.entity.GenericValue project)
          Get a collection of all version ids in the selected project
 java.util.Collection getReportIssues(com.opensymphony.user.User user, java.lang.Long projectId, java.lang.Long versionId, java.lang.String sortingOrder, java.lang.String completedFilter)
          Get the list of issues to be displayed in the report
 java.lang.String getTimeEstTot()
           
 java.lang.String getTimeSpentTot()
           
 java.lang.String getTotalCurrentEst()
           
 boolean isExcelViewSupported()
          By default, reports do not have an Excel view.
 int isOnSchedeule(java.lang.Long originalEst, java.lang.Long timeEst, java.lang.Long timeSpent)
           
 int isOnSchedule(org.ofbiz.core.entity.GenericValue issue)
           
 int isTotalOnSchedule()
           
 boolean showReport()
          Whether or not to show this report in the interface.
 void validate(ProjectActionSupport action, java.util.Map params)
          Validate the parameters passed to this report from the UI.
 
Methods inherited from class com.atlassian.jira.plugin.report.impl.AbstractReport
getDescriptor, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeTrackingReport

public TimeTrackingReport(VersionManager versionManager,
                          ApplicationProperties applicationProperties,
                          IssueManager issueManager,
                          ConstantsManager constantsManager)
Method Detail

showReport

public boolean showReport()
Description copied from class: AbstractReport
Whether or not to show this report in the interface. The default is "true".

Specified by:
showReport in interface Report
Overrides:
showReport in class AbstractReport

getParams

public java.util.Map getParams(ProjectActionSupport action,
                               java.util.Map reqParams)
                        throws PermissionException,
                               org.ofbiz.core.entity.GenericEntityException,
                               SearchException
Throws:
PermissionException
org.ofbiz.core.entity.GenericEntityException
SearchException

generateReportHtml

public java.lang.String generateReportHtml(ProjectActionSupport action,
                                           java.util.Map reqParams)
                                    throws java.lang.Exception
Description copied from interface: Report
Generate the report's HTML - usually from the Velocity resource named "html".

Throws:
java.lang.Exception

generateReportExcel

public java.lang.String generateReportExcel(ProjectActionSupport action,
                                            java.util.Map reqParams)
                                     throws java.lang.Exception
Description copied from class: AbstractReport
By default, will throw an UnsuppportedOperationException as reports don't support Excel by default.

Specified by:
generateReportExcel in interface Report
Overrides:
generateReportExcel in class AbstractReport
Throws:
java.lang.Exception

isExcelViewSupported

public boolean isExcelViewSupported()
Description copied from class: AbstractReport
By default, reports do not have an Excel view.

Specified by:
isExcelViewSupported in interface Report
Overrides:
isExcelViewSupported in class AbstractReport

validate

public void validate(ProjectActionSupport action,
                     java.util.Map params)
Description copied from interface: Report
Validate the parameters passed to this report from the UI.

Any errors should be added to the action errors.

Specified by:
validate in interface Report
Overrides:
validate in class AbstractReport

getProjectVersionIds

public java.util.Collection getProjectVersionIds(org.ofbiz.core.entity.GenericValue project)
                                          throws java.lang.Exception
Get a collection of all version ids in the selected project

Returns:
Throws:
java.lang.Exception

getReportIssues

public java.util.Collection getReportIssues(com.opensymphony.user.User user,
                                            java.lang.Long projectId,
                                            java.lang.Long versionId,
                                            java.lang.String sortingOrder,
                                            java.lang.String completedFilter)
                                     throws SearchException
Get the list of issues to be displayed in the report

Throws:
SearchException

getNiceTimeDuration

public java.lang.String getNiceTimeDuration(org.ofbiz.core.entity.GenericValue issue,
                                            java.lang.String field)

getOriginalEstTot

public java.lang.String getOriginalEstTot()

getTimeSpentTot

public java.lang.String getTimeSpentTot()

getTimeEstTot

public java.lang.String getTimeEstTot()

getAccuracyTot

public java.lang.String getAccuracyTot()

getTotalCurrentEst

public java.lang.String getTotalCurrentEst()

getDurationInMinutes

public long getDurationInMinutes(long seconds)

getCompletionPercentage

public int getCompletionPercentage()

getAccuracyPercentage

public int getAccuracyPercentage()

isTotalOnSchedule

public int isTotalOnSchedule()

isOnSchedule

public int isOnSchedule(org.ofbiz.core.entity.GenericValue issue)

isOnSchedeule

public int isOnSchedeule(java.lang.Long originalEst,
                         java.lang.Long timeEst,
                         java.lang.Long timeSpent)

getNiceAccuracy

public java.lang.String getNiceAccuracy(org.ofbiz.core.entity.GenericValue issue)
Generate a nice accuracy string

Parameters:
issue -
Returns:

getLongAccuracy

public static long getLongAccuracy(long originalEst,
                                   long timeEst,
                                   long timeSpent)

getLongAccuracyPercentage

public static int getLongAccuracyPercentage(long originalEst,
                                            long timeEst,
                                            long timeSpent)


Copyright © 2002-2006 Atlassian. All Rights Reserved.