19 package org.turro.issue.wizard;
21 import java.util.Date;
22 import org.amic.util.date.CheckDate;
23 import org.turro.string.Strings;
24 import org.turro.auth.Authentication;
25 import org.turro.dossier.db.DossierPU;
26 import org.turro.dossier.entity.*;
27 import org.turro.dossier.issue.IssueMail;
28 import org.turro.dossier.issue.IssueWrapper;
29 import org.turro.dossier.zul.issue.IssueResolutionListbox;
30 import org.turro.dossier.zul.menu.DossierMenu;
31 import org.turro.elephant.context.Application;
32 import org.turro.entities.EntityCombobox;
33 import org.turro.i18n.I_;
34 import org.turro.jpa.Dao;
35 import org.turro.jpa.entity.EntityArray;
36 import org.turro.log.SystemLogType;
37 import org.turro.log.SystemLogger;
38 import org.turro.registry.ChangeCategory;
39 import org.turro.registry.EnumChange;
40 import org.turro.registry.StringChange;
41 import org.turro.related.RelatedItem;
42 import org.turro.related.Relateds;
43 import org.turro.zkoss.wizard.WizardPanelComposer;
44 import org.zkoss.zul.Checkbox;
45 import org.zkoss.zul.Hlayout;
46 import org.zkoss.zul.Radio;
47 import org.zkoss.zul.Radiogroup;
55 private Radiogroup action;
56 private Radio leaveAs, start, incomplete, resolve,
57 reopen, reunion, freeze, verify, close;
58 private Checkbox doClose, noEmail, show;
59 private Hlayout resolveBox;
72 leaveAs.setChecked(
true);
83 noEmail.setVisible(app.
isInRole(
"issue:cancel-email"));
90 public boolean doLeave(
boolean forwards) {
91 ChangeCategory issueCat =
new ChangeCategory(2,
I_.
get(
"Changes"));
98 if(start.isChecked()) {
100 }
else if(incomplete.isChecked()) {
102 }
else if(resolve.isChecked()) {
108 }
else if(reopen.isChecked()) {
110 }
else if(reunion.isChecked()) {
112 }
else if(freeze.isChecked()) {
114 }
else if(verify.isChecked()) {
116 }
else if(close.isChecked()) {
125 }
else if(couldResolve) {
126 iw.
changes.addChange(
new EnumChange(issueCat,
I_.
get(
"Resolution"),
130 iw.
changes.addChange(
new StringChange(issueCat,
I_.
get(
"Duplicated"),
138 if(doClose.isChecked()) {
139 iw.
changes.addChange(
new EnumChange(issueCat,
I_.
get(
"Status"),
143 iw.
changes.addChange(
new EnumChange(issueCat,
I_.
get(
"Resolution"),
150 iw.
show = show.isChecked();
151 iw.cancelMail = noEmail.isChecked();
155 return !forwards || ( true );
167 if(!duplicated.isVisible()) {
185 return wrapper.
isQA();
193 return wrapper.
hasQA();
237 setDatesFor(clone, i + 1, iw);
239 dao.saveObject(clone);
246 case ARRAY_EVERY_DAY:
255 case ARRAY_EVERY_WEEK:
264 case ARRAY_EVERY_MONTH:
273 case ARRAY_EVERY_YEAR:
318 if(iw.
changes.isEmpty())
return;
329 if(iw.
changes.stringSize() > 0) {
330 String cloneString =
"";
static IContact getIContact()
static String getObjectPath(Object object)
DossierStatus getStatus()
void setStatus(DossierStatus status)
void setIssue(Issue issue)
void setRole(IssueParticipantRole role)
void setIdContact(String idContact)
void setName(String name)
void setPublishable(boolean publishable)
void setType(IssueType type)
IssueResolution getResolution()
IssuePriority getPriority()
void setResolution(IssueResolution resolution)
void setDescription(String description)
void setModification(Date modification)
void setVersion(DossierVersion version)
void setStatus(IssueStatus status)
void setDossier(Dossier dossier)
void setControlDate(Date controlDate)
void setPriority(IssuePriority priority)
Set< IssueComment > getComments()
void setDuplicated(Issue duplicated)
void setStartDate(Date startDate)
void setHours(double hours)
DossierVersion getVersion()
Set< IssueParticipant > getParticipants()
void setIssueDate(Date issueDate)
String getFullDescription()
void setPrice(double price)
void setExpenses(double expenses)
void setDelivery(Date delivery)
static void checkPendingRevision(Issue issue)
boolean getCanCheckClose()
boolean getCanMarkAsIncomplete()
IssuePredecessor save(Dao dao, Issue task)
boolean isInRole(String role)
static Application getApplication()
static String byKey(String key)
static String get(String msg)
boolean getCanMarkAsIncomplete()
static void saveIssue(IssueWizard iw, boolean onlySave)
void onSelect $resolution()
boolean doLeave(boolean forwards)
boolean getCanCheckClose()
static void array(IssueWizard iw)
static Issue cloneFrom(Issue issue)
static ISystemLogger getInstance()
void doLog(SystemLogType type, Object entity, String comment, Serializable data)