BrightSide Workbench Full Report + Source Code
org.turro.dossier.dw.DossierDWReport Class Reference
Collaboration diagram for org.turro.dossier.dw.DossierDWReport:

Public Member Functions

void setReportValues (Dossier dossier)
 
void setReportValues (String participantId, IssueParticipantRole role, Long dossierId)
 
void setReportValues (String participantId, IssueParticipantRole role, Collection< DossierIds > dossierIds)
 
double getIssueCount ()
 
DossierValues getPrevision ()
 
DossierValues getReality ()
 
DossierData getData ()
 
double getIssueCountByType (IssueType type)
 
double getIssueCountByStatus (IssueStatus status)
 
double getIssueCountByResolution (IssueResolution resolution)
 
double getPositivelySolved ()
 
double getNegativelySolved ()
 
double getSolved ()
 
double getOnWork ()
 
double getStandBy ()
 
Collection< String > getIssuesPathByType (String type)
 
Collection< String > getIssuesPathByStatus (String status)
 
Collection< String > getIssuesPathByResolution (String resolution)
 
Map< IssueType, Double > getIssuesByType ()
 
Map< IssueStatus, Double > getIssuesByStatus ()
 
Map< IssueResolution, Double > getIssuesByResolution ()
 
Double getEfectivity ()
 
Double getDaySpanAverage ()
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 48 of file DossierDWReport.java.

Member Function Documentation

◆ getData()

DossierData org.turro.dossier.dw.DossierDWReport.getData ( )

Definition at line 103 of file DossierDWReport.java.

103  {
104  return new DossierData(getPrevision(), getReality());
105  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDaySpanAverage()

Double org.turro.dossier.dw.DossierDWReport.getDaySpanAverage ( )

Definition at line 250 of file DossierDWReport.java.

250  {
251  double issues = 0, days = 0;
252  for(DossierReportItem dri : getItems()) {
253  if(dri.status.isFinished() && dri.startDate != null &&
254  dri.solvedDate != null && dri.startDate.before(dri.solvedDate)) {
255  issues++;
256  days = (dri.solvedDate.getTime() - dri.startDate.getTime()) / (24 * 60 * 60 * 1000);
257  }
258  }
259  return new Round(issues > 0 ? days / issues : 0).decimals(2).value();
260  }
Here is the call graph for this function:

◆ getEfectivity()

Double org.turro.dossier.dw.DossierDWReport.getEfectivity ( )

Definition at line 245 of file DossierDWReport.java.

245  {
246  double solved = getSolved();
247  return new Round(solved > 0 ? getPositivelySolved() / solved : 0).perCent(2);
248  }
Here is the call graph for this function:

◆ getIssueCount()

double org.turro.dossier.dw.DossierDWReport.getIssueCount ( )

Definition at line 75 of file DossierDWReport.java.

75  {
76  return (double) getItems().size();
77  }

◆ getIssueCountByResolution()

double org.turro.dossier.dw.DossierDWReport.getIssueCountByResolution ( IssueResolution  resolution)

Definition at line 127 of file DossierDWReport.java.

127  {
128  double count = 0;
129  for(DossierReportItem dri : getItems()) {
130  if(dri.status.isFinished() && dri.resolution.equals(resolution)) {
131  count++;
132  }
133  }
134  return count;
135  }
Here is the caller graph for this function:

◆ getIssueCountByStatus()

double org.turro.dossier.dw.DossierDWReport.getIssueCountByStatus ( IssueStatus  status)

Definition at line 117 of file DossierDWReport.java.

117  {
118  double count = 0;
119  for(DossierReportItem dri : getItems()) {
120  if(dri.status.equals(status)) {
121  count++;
122  }
123  }
124  return count;
125  }
Here is the caller graph for this function:

◆ getIssueCountByType()

double org.turro.dossier.dw.DossierDWReport.getIssueCountByType ( IssueType  type)

Definition at line 107 of file DossierDWReport.java.

107  {
108  double count = 0;
109  for(DossierReportItem dri : getItems()) {
110  if(dri.type.equals(type)) {
111  count++;
112  }
113  }
114  return count;
115  }
Here is the caller graph for this function:

◆ getIssuesByResolution()

Map<IssueResolution, Double> org.turro.dossier.dw.DossierDWReport.getIssuesByResolution ( )

Definition at line 236 of file DossierDWReport.java.

236  {
237  Map resolution = new EnumMap<>(IssueResolution.class);
238  for(IssueResolution is : IssueResolution.values()) {
239  double d = getIssueCountByResolution(is);
240  if(d > 0.0) resolution.put(is, d);
241  }
242  return resolution;
243  }
double getIssueCountByResolution(IssueResolution resolution)
Here is the call graph for this function:

◆ getIssuesByStatus()

Map<IssueStatus, Double> org.turro.dossier.dw.DossierDWReport.getIssuesByStatus ( )

Definition at line 227 of file DossierDWReport.java.

227  {
228  Map status = new EnumMap<>(IssueStatus.class);
229  for(IssueStatus is : IssueStatus.values()) {
230  double d = getIssueCountByStatus(is);
231  if(d > 0.0) status.put(is, d);
232  }
233  return status;
234  }
double getIssueCountByStatus(IssueStatus status)
Here is the call graph for this function:

◆ getIssuesByType()

Map<IssueType, Double> org.turro.dossier.dw.DossierDWReport.getIssuesByType ( )

Definition at line 218 of file DossierDWReport.java.

218  {
219  Map type = new EnumMap<>(IssueType.class);
220  for(IssueType is : IssueType.values()) {
221  double d = getIssueCountByType(is);
222  if(d > 0.0) type.put(is, d);
223  }
224  return type;
225  }
double getIssueCountByType(IssueType type)
Here is the call graph for this function:

◆ getIssuesPathByResolution()

Collection<String> org.turro.dossier.dw.DossierDWReport.getIssuesPathByResolution ( String  resolution)

Definition at line 207 of file DossierDWReport.java.

207  {
208  ArrayList<String> list = new ArrayList<>();
209  for(DossierReportItem dri : getItems()) {
210  if(I_.byKey(dri.resolution.toString()).equals(resolution)) {
211  list.add("/issue/" + dri.issueId);
212  }
213  }
214  return list;
215  }
Here is the call graph for this function:

◆ getIssuesPathByStatus()

Collection<String> org.turro.dossier.dw.DossierDWReport.getIssuesPathByStatus ( String  status)

Definition at line 197 of file DossierDWReport.java.

197  {
198  ArrayList<String> list = new ArrayList<>();
199  for(DossierReportItem dri : getItems()) {
200  if(I_.byKey(dri.status.toString()).equals(status)) {
201  list.add("/issue/" + dri.issueId);
202  }
203  }
204  return list;
205  }
Here is the call graph for this function:

◆ getIssuesPathByType()

Collection<String> org.turro.dossier.dw.DossierDWReport.getIssuesPathByType ( String  type)

Definition at line 187 of file DossierDWReport.java.

187  {
188  ArrayList<String> list = new ArrayList<>();
189  for(DossierReportItem dri : getItems()) {
190  if(I_.byKey(dri.type.toString()).equals(type)) {
191  list.add("/issue/" + dri.issueId);
192  }
193  }
194  return list;
195  }
Here is the call graph for this function:

◆ getNegativelySolved()

double org.turro.dossier.dw.DossierDWReport.getNegativelySolved ( )

Definition at line 147 of file DossierDWReport.java.

147  {
148  double count = 0;
149  for(DossierReportItem dri : getItems()) {
150  if(dri.status.isFinished() && !(dri.resolution.isSolved()) && !(dri.resolution.isRejected())) {
151  count++;
152  }
153  }
154  return count;
155  }

◆ getOnWork()

double org.turro.dossier.dw.DossierDWReport.getOnWork ( )

Definition at line 167 of file DossierDWReport.java.

167  {
168  double count = 0;
169  for(DossierReportItem dri : getItems()) {
170  if(dri.status.isWorking()) {
171  count++;
172  }
173  }
174  return count;
175  }

◆ getPositivelySolved()

double org.turro.dossier.dw.DossierDWReport.getPositivelySolved ( )

Definition at line 137 of file DossierDWReport.java.

137  {
138  double count = 0;
139  for(DossierReportItem dri : getItems()) {
140  if(dri.status.isFinished() && dri.resolution.isSolved()) {
141  count++;
142  }
143  }
144  return count;
145  }
Here is the caller graph for this function:

◆ getPrevision()

DossierValues org.turro.dossier.dw.DossierDWReport.getPrevision ( )

Definition at line 79 of file DossierDWReport.java.

79  {
80  if(prevision == null) {
81  prevision = new DossierValues();
82  for(DossierReportItem dri : getItems()) {
83  prevision.expenses += dri.prevision.expenses;
84  prevision.hours += dri.prevision.hours;
85  prevision.price += dri.prevision.price;
86  }
87  }
88  return prevision;
89  }
Here is the caller graph for this function:

◆ getReality()

DossierValues org.turro.dossier.dw.DossierDWReport.getReality ( )

Definition at line 91 of file DossierDWReport.java.

91  {
92  if(reality == null) {
93  reality = new DossierValues();
94  for(DossierReportItem dri : getItems()) {
95  reality.expenses += dri.reality.expenses;
96  reality.hours += dri.reality.hours;
97  reality.price += dri.reality.price;
98  }
99  }
100  return reality;
101  }
Here is the caller graph for this function:

◆ getSolved()

double org.turro.dossier.dw.DossierDWReport.getSolved ( )

Definition at line 157 of file DossierDWReport.java.

157  {
158  double count = 0;
159  for(DossierReportItem dri : getItems()) {
160  if(dri.status.isFinished()) {
161  count++;
162  }
163  }
164  return count;
165  }
Here is the caller graph for this function:

◆ getStandBy()

double org.turro.dossier.dw.DossierDWReport.getStandBy ( )

Definition at line 177 of file DossierDWReport.java.

177  {
178  double count = 0;
179  for(DossierReportItem dri : getItems()) {
180  if(dri.status.isStandBy()) {
181  count++;
182  }
183  }
184  return count;
185  }

◆ setReportValues() [1/3]

void org.turro.dossier.dw.DossierDWReport.setReportValues ( Dossier  dossier)

Definition at line 56 of file DossierDWReport.java.

56  {
57  setReportValues(null, null, dossier.getId());
58  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setReportValues() [2/3]

void org.turro.dossier.dw.DossierDWReport.setReportValues ( String  participantId,
IssueParticipantRole  role,
Collection< DossierIds dossierIds 
)

Definition at line 66 of file DossierDWReport.java.

66  {
67  this.participantId = participantId;
68  this.role = role;
69  this.dossierIds = dossierIds;
70  prevision = null;
71  reality = null;
72  items = null;
73  }

◆ setReportValues() [3/3]

void org.turro.dossier.dw.DossierDWReport.setReportValues ( String  participantId,
IssueParticipantRole  role,
Long  dossierId 
)

Definition at line 60 of file DossierDWReport.java.

60  {
61  ArrayList al = new ArrayList();
62  al.add(new DossierIds(dossierId, 0L, null));
63  setReportValues(participantId, role, al);
64  }
Here is the call graph for this function:

The documentation for this class was generated from the following file: