BrightSide Workbench Full Report + Source Code
org.turro.issue.wizard.ResolvePanel Class Reference
Inheritance diagram for org.turro.issue.wizard.ResolvePanel:
Collaboration diagram for org.turro.issue.wizard.ResolvePanel:

Public Member Functions

boolean doEnter ()
 
boolean doLeave (boolean forwards)
 
boolean doFinish ()
 
void onSelect $resolution ()
 
boolean isParticipant ()
 
boolean isReporter ()
 
boolean isResponsible ()
 
boolean isQA ()
 
boolean isAssistant ()
 
boolean hasQA ()
 
String getLeaveAsLabel ()
 
boolean getCanStart ()
 
boolean getCanMarkAsIncomplete ()
 
boolean getCanFreeze ()
 
boolean getCanResolve ()
 
boolean getCanReopen ()
 
boolean getCanVerify ()
 
boolean getCanClose ()
 
boolean getCanCheckClose ()
 
- Public Member Functions inherited from org.turro.zkoss.wizard.WizardPanelComposer
Object getObjectValue ()
 
void setObjectValue (Object objectValue)
 
boolean doCancel ()
 
void setShouldSkip (boolean shouldSkip)
 
void setFinalSplash (boolean finalSplash)
 
void setAllowPrior (boolean allowPrior)
 
void setAllowNext (boolean allowNext)
 
void setAllowFinish (boolean allowFinish)
 
void setAllowCancel (boolean allowCancel)
 
boolean isShouldSkip ()
 
boolean isFinalSplash ()
 
boolean isAllowPrior ()
 
boolean isAllowNext ()
 
boolean isAllowFinish ()
 
boolean isAllowCancel ()
 

Static Public Member Functions

static void array (IssueWizard iw)
 
static Issue cloneFrom (Issue issue)
 
static void saveIssue (IssueWizard iw, boolean onlySave)
 

Detailed Description

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

Definition at line 53 of file ResolvePanel.java.

Member Function Documentation

◆ $resolution()

void onSelect org.turro.issue.wizard.ResolvePanel.$resolution ( )

Definition at line 165 of file ResolvePanel.java.

165  {
166  duplicated.setVisible(resolution.getObjectValue().equals(IssueResolution.RESOLUTION_DUPLICATED));
167  if(!duplicated.isVisible()) {
168  duplicated.setObjectValue(null);
169  }
170  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ array()

static void org.turro.issue.wizard.ResolvePanel.array ( IssueWizard  iw)
static

Definition at line 232 of file ResolvePanel.java.

232  {
233  if(iw.issue.getStartDate() == null) return;
234  if(!EntityArray.ARRAY_NO_REPEAT.equals(iw.repeat) && iw.repeatCount > 0) {
235  for(int i = 0; i < iw.repeatCount; i++) {
236  Issue clone = cloneFrom(iw.issue);
237  setDatesFor(clone, i + 1, iw);
238  Dao dao = new DossierPU();
239  dao.saveObject(clone);
240  }
241  }
242  }
static Issue cloneFrom(Issue issue)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cloneFrom()

static Issue org.turro.issue.wizard.ResolvePanel.cloneFrom ( Issue  issue)
static

Definition at line 285 of file ResolvePanel.java.

285  {
286  Issue clone = new Issue();
287  clone.setDescription(issue.getDescription());
288  clone.setDossier(issue.getDossier());
289  clone.setExpenses(issue.getExpenses());
290  clone.setHours(issue.getHours());
291  clone.setIssueDate(issue.getIssueDate());
292  clone.setModification(new Date());
293  clone.setPrice(issue.getPrice());
294  clone.setPriority(issue.getPriority());
295  clone.setPublishable(issue.isPublishable());
296  clone.setStatus(issue.getStatus());
297  clone.setResolution(issue.getResolution());
298  clone.setType(issue.getType());
299  clone.setVersion(issue.getVersion());
300  for(IssueParticipant ip : issue.getParticipants()) {
302  nip.setIdContact(ip.getIdContact());
303  nip.setIssue(clone);
304  nip.setName(ip.getName());
305  nip.setRole(ip.getRole());
306  clone.getParticipants().add(nip);
307  }
308  IssueComment ic = new IssueComment();
309  ic.setIContact(Authentication.getIContact());
310  ic.setComment("Clone #" + issue.getId());
311  ic.setIssue(clone);
312  ic.setModification(clone.getModification());
313  clone.getComments().add(ic);
314  return clone;
315  }
void setModification(Date modification)
void setRole(IssueParticipantRole role)
void setPublishable(boolean publishable)
Definition: Issue.java:218
void setType(IssueType type)
Definition: Issue.java:295
IssueResolution getResolution()
Definition: Issue.java:226
IssuePriority getPriority()
Definition: Issue.java:206
void setResolution(IssueResolution resolution)
Definition: Issue.java:230
void setDescription(String description)
Definition: Issue.java:154
void setModification(Date modification)
Definition: Issue.java:202
void setVersion(DossierVersion version)
Definition: Issue.java:335
void setStatus(IssueStatus status)
Definition: Issue.java:246
void setDossier(Dossier dossier)
Definition: Issue.java:162
void setPriority(IssuePriority priority)
Definition: Issue.java:210
Set< IssueComment > getComments()
Definition: Issue.java:122
void setHours(double hours)
Definition: Issue.java:311
DossierVersion getVersion()
Definition: Issue.java:331
Set< IssueParticipant > getParticipants()
Definition: Issue.java:114
void setIssueDate(Date issueDate)
Definition: Issue.java:186
void setPrice(double price)
Definition: Issue.java:319
void setExpenses(double expenses)
Definition: Issue.java:303
Here is the call graph for this function:
Here is the caller graph for this function:

◆ doEnter()

boolean org.turro.issue.wizard.ResolvePanel.doEnter ( )

Reimplemented from org.turro.zkoss.wizard.WizardPanelComposer.

Definition at line 67 of file ResolvePanel.java.

67  {
68  Application app = Application.getApplication();
69  iw = (IssueWizard) getObjectValue();
70  wrapper = new IssueWrapper(iw.issue);
71  leaveAs.setLabel(getLeaveAsLabel());
72  leaveAs.setChecked(true);
73  start.setVisible(getCanStart());
74  incomplete.setVisible(getCanMarkAsIncomplete());
75  resolveBox.setVisible(getCanResolve());
76  duplicated.setObjectValue(iw.issue.getDuplicated());
77  resolution.setObjectValue(IssueResolution.RESOLUTION_FIXED);
78  reopen.setVisible(getCanReopen());
79  freeze.setVisible(getCanFreeze());
80  verify.setVisible(getCanVerify());
81  close.setVisible(getCanClose());
82  doClose.setVisible(getCanCheckClose());
83  noEmail.setVisible(app.isInRole("issue:cancel-email"));
84  show.setLabel(I_.get("Show") + ": " + iw.issue.getFullDescription());
85  onSelect$resolution();
86  return true;
87  }
static String get(String msg)
Definition: I_.java:41
Here is the call graph for this function:

◆ doFinish()

boolean org.turro.issue.wizard.ResolvePanel.doFinish ( )

Reimplemented from org.turro.zkoss.wizard.WizardPanelComposer.

Definition at line 159 of file ResolvePanel.java.

159  {
160  ResolvePanel.saveIssue(iw, false);
161  ResolvePanel.array(iw);
162  return true;
163  }
Here is the call graph for this function:

◆ doLeave()

boolean org.turro.issue.wizard.ResolvePanel.doLeave ( boolean  forwards)

Reimplemented from org.turro.zkoss.wizard.WizardPanelComposer.

Definition at line 90 of file ResolvePanel.java.

90  {
91  ChangeCategory issueCat = new ChangeCategory(2, I_.get("Changes"));
92  iw = (IssueWizard) getObjectValue();
93 
94  IssueStatus status = iw.issue.getStatus();
95 
96  boolean couldResolve = getCanResolve();
97 
98  if(start.isChecked()) {
99  status = IssueStatus.STATUS_STARTED;
100  } else if(incomplete.isChecked()) {
102  } else if(resolve.isChecked()) {
103  if(resolution.getObjectValue().equals(IssueResolution.RESOLUTION_DUPLICATED) && duplicated.getObjectValue() == null) {
104  // throwm message exception
105  } else {
106  status = IssueStatus.STATUS_RESOLVED;
107  }
108  } else if(reopen.isChecked()) {
109  status = IssueStatus.STATUS_REOPENED;
110  } else if(reunion.isChecked()) {
111  status = IssueStatus.STATUS_REUNION;
112  } else if(freeze.isChecked()) {
113  status = IssueStatus.STATUS_FROZEN;
114  } else if(verify.isChecked()) {
115  status = IssueStatus.STATUS_VERIFIED;
116  } else if(close.isChecked()) {
117  status = IssueStatus.STATUS_CLOSED;
118  }
119 
120  iw.changes.addChange(new EnumChange(issueCat, I_.get("Status"), iw.issue.getStatus(), status, false));
121  iw.issue.setStatus(status, iw.date);
122  if(!(iw.issue.getStatus().isFinished())) {
124  iw.issue.setDuplicated(null);
125  } else if(couldResolve) {
126  iw.changes.addChange(new EnumChange(issueCat, I_.get("Resolution"),
127  iw.issue.getResolution(), resolution.getObjectValue(), false));
128  iw.issue.setResolution(resolution.getObjectValue());
130  iw.changes.addChange(new StringChange(issueCat, I_.get("Duplicated"),
131  iw.issue.getDuplicated() != null ? iw.issue.getDuplicated().getDescription() : "",
132  duplicated != null ? ((Issue) duplicated.getObjectValue()).getDescription() : ""));
133  iw.issue.setDuplicated((Issue) duplicated.getObjectValue());
134  } else {
135  iw.issue.setDuplicated(null);
136  }
137  }
138  if(doClose.isChecked()) {
139  iw.changes.addChange(new EnumChange(issueCat, I_.get("Status"),
140  iw.issue.getStatus(), IssueStatus.STATUS_CLOSED, false));
143  iw.changes.addChange(new EnumChange(issueCat, I_.get("Resolution"),
146  }
147  }
148  iw.issue.setModification(iw.date);
149  wrapper.clearEmpties();
150  iw.show = show.isChecked();
151  iw.cancelMail = noEmail.isChecked();
152 
153  ResolvePanel.saveIssue(iw, true);
154 
155  return !forwards || ( true );
156  }
void setDuplicated(Issue duplicated)
Definition: Issue.java:170
Here is the call graph for this function:

◆ getCanCheckClose()

boolean org.turro.issue.wizard.ResolvePanel.getCanCheckClose ( )

Definition at line 228 of file ResolvePanel.java.

228  {
229  return wrapper.getCanCheckClose();
230  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCanClose()

boolean org.turro.issue.wizard.ResolvePanel.getCanClose ( )

Definition at line 224 of file ResolvePanel.java.

224  {
225  return wrapper.getCanClose();
226  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCanFreeze()

boolean org.turro.issue.wizard.ResolvePanel.getCanFreeze ( )

Definition at line 208 of file ResolvePanel.java.

208  {
209  return wrapper.getCanFreeze();
210  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCanMarkAsIncomplete()

boolean org.turro.issue.wizard.ResolvePanel.getCanMarkAsIncomplete ( )

Definition at line 204 of file ResolvePanel.java.

204  {
205  return wrapper.getCanMarkAsIncomplete();
206  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCanReopen()

boolean org.turro.issue.wizard.ResolvePanel.getCanReopen ( )

Definition at line 216 of file ResolvePanel.java.

216  {
217  return wrapper.getCanReopen();
218  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCanResolve()

boolean org.turro.issue.wizard.ResolvePanel.getCanResolve ( )

Definition at line 212 of file ResolvePanel.java.

212  {
213  return wrapper.getCanResolve();
214  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCanStart()

boolean org.turro.issue.wizard.ResolvePanel.getCanStart ( )

Definition at line 200 of file ResolvePanel.java.

200  {
201  return wrapper.getCanStart();
202  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCanVerify()

boolean org.turro.issue.wizard.ResolvePanel.getCanVerify ( )

Definition at line 220 of file ResolvePanel.java.

220  {
221  return wrapper.getCanVerify();
222  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getLeaveAsLabel()

String org.turro.issue.wizard.ResolvePanel.getLeaveAsLabel ( )

Definition at line 196 of file ResolvePanel.java.

196  {
197  return wrapper.getLeaveAsLabel();
198  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hasQA()

boolean org.turro.issue.wizard.ResolvePanel.hasQA ( )

Definition at line 192 of file ResolvePanel.java.

192  {
193  return wrapper.hasQA();
194  }
Here is the call graph for this function:

◆ isAssistant()

boolean org.turro.issue.wizard.ResolvePanel.isAssistant ( )

Definition at line 188 of file ResolvePanel.java.

188  {
189  return wrapper.isAssistant();
190  }
Here is the call graph for this function:

◆ isParticipant()

boolean org.turro.issue.wizard.ResolvePanel.isParticipant ( )

Definition at line 172 of file ResolvePanel.java.

172  {
173  return wrapper.isParticipant();
174  }
Here is the call graph for this function:

◆ isQA()

boolean org.turro.issue.wizard.ResolvePanel.isQA ( )

Definition at line 184 of file ResolvePanel.java.

184  {
185  return wrapper.isQA();
186  }
Here is the call graph for this function:

◆ isReporter()

boolean org.turro.issue.wizard.ResolvePanel.isReporter ( )

Definition at line 176 of file ResolvePanel.java.

176  {
177  return wrapper.isReporter();
178  }
Here is the call graph for this function:

◆ isResponsible()

boolean org.turro.issue.wizard.ResolvePanel.isResponsible ( )

Definition at line 180 of file ResolvePanel.java.

180  {
181  return wrapper.isResponsible();
182  }
Here is the call graph for this function:

◆ saveIssue()

static void org.turro.issue.wizard.ResolvePanel.saveIssue ( IssueWizard  iw,
boolean  onlySave 
)
static

Definition at line 317 of file ResolvePanel.java.

317  {
318  if(iw.changes.isEmpty()) return;
319  Dao dao = new DossierPU();
320  RelatedItem rpi = iw.issue.getRelated();
321  if(iw.issue.getComments().isEmpty()) {
322  iw.issue.setIssueDate(iw.date);
323  }
324  if(!onlySave) {
325  if(iw.subtask != null) {
326  iw.subtask.save(dao, iw.issue);
327  }
328  iw.changes.clearEquals();
329  if(iw.changes.stringSize() > 0) {
330  String cloneString = "";
331  if(iw.issue.getStartDate() != null && !EntityArray.ARRAY_NO_REPEAT.equals(iw.repeat) && iw.repeatCount > 0) {
332  cloneString = "\n\n Clone: " + iw.repeatCount + " " + I_.byKey(iw.repeat.toString());
333  }
334  IssueComment ic = new IssueComment();
335  ic.setIssue(iw.issue);
336  ic.setModification(iw.date);
337  ic.setIContact(Authentication.getIContact());
338  ic.setComment(iw.changes.getChangesString() + cloneString);
339  ic.setExpenses(iw.expenses);
340  ic.setHours(iw.hours);
341  ic.setPrice(iw.price);
342  ic.setProcessed(iw.expenses == 0 && iw.hours == 0 && iw.price == 0);
343  iw.issue.getComments().add(ic);
344  }
345  }
346  iw.issue = dao.saveObject(iw.issue);
347  if(!Strings.isBlank(rpi.getRelatedPath())) {
348  Relateds.from(rpi.getRelatedPath()).addDestination(
350  rpi.getDescription());
351  }
352  if(iw.issue.getDossier() != null && !iw.issue.getDossier().getStatus().equals(DossierStatus.DOSSIER_OPENED)) {
354  iw.issue.setDossier(dao.saveObject(iw.issue.getDossier()));
355  }
356  if(!onlySave) {
357  SystemLogger.getInstance().doLog(SystemLogType.LOG_INFO, iw.issue, "saved",
358  iw.issue.getId() + " - " + iw.issue.getDescription());
359  if(!iw.cancelMail) {
360  new IssueMail(iw.changes, iw.issue, iw.expenses, iw.hours, iw.price).sendMail();
361  }
362  iw.changes.clear();
363  if(iw.show) {
364  DossierMenu.showIssue(iw.issue.getId());
365  }
366  }
367  IssueWrapper.checkPendingRevision(iw.issue);
368  }
static String getObjectPath(Object object)
Definition: DossierPU.java:66
void setStatus(DossierStatus status)
Definition: Dossier.java:195
void setProcessed(boolean processed)
IssuePredecessor save(Dao dao, Issue task)
Definition: Subtask.java:42
static String byKey(String key)
Definition: I_.java:83
Here is the call graph for this function:
Here is the caller graph for this function:

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