рефакторинг. переносил текущие объекты в другое место
This commit is contained in:
@@ -70,7 +70,7 @@ public class BugReport extends rDBObject {
|
||||
date = new Date().getTime();
|
||||
change_date = new Date().getTime();
|
||||
state = BugReportState.draft;
|
||||
owner = Current.getProject().Home;
|
||||
owner = Global.mainModule.getProject().Home;
|
||||
}
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
|
||||
@@ -29,8 +29,8 @@ public class BugReportInterface {
|
||||
&& object.project_version.toUpperCase().contains(filterVersion.toUpperCase())
|
||||
&& (!filterOpenedOnly || object.state.equals(BugReportState.active))
|
||||
&& (!filterMyOnly ||
|
||||
(object.sender_address.equalsIgnoreCase(Current.getAccount().email) ||
|
||||
object.executor_address.equalsIgnoreCase(Current.getAccount().email)
|
||||
(object.sender_address.equalsIgnoreCase(Global.mainModule.getAccount().email) ||
|
||||
object.executor_address.equalsIgnoreCase(Global.mainModule.getAccount().email)
|
||||
)
|
||||
);
|
||||
}
|
||||
@@ -69,12 +69,12 @@ public class BugReportInterface {
|
||||
for (String a : data)
|
||||
if (a.length() > 0)
|
||||
res.add(a);
|
||||
if (!res.contains(Current.getAccount().email))
|
||||
res.add(Current.getAccount().email);
|
||||
if (!res.contains(Global.mainModule.getAccount().email))
|
||||
res.add(Global.mainModule.getAccount().email);
|
||||
return res;
|
||||
}
|
||||
public static File[] getAttachements(BugReport object) {
|
||||
File[] project_attachements = Current.getProject().getAttachmentsDirectory().listFiles();
|
||||
File[] project_attachements = Global.mainModule.getProject().getAttachmentsDirectory().listFiles();
|
||||
File[] res = new File[project_attachements.length + 1];
|
||||
res[0] = getArchiveFile(object);
|
||||
for (int i = 0; i < project_attachements.length; ++i)
|
||||
@@ -97,7 +97,7 @@ public class BugReportInterface {
|
||||
}
|
||||
public static String getSettingsSummary(BugReport object) {
|
||||
return
|
||||
(Current.HasAccount() ? (Current.getAccount().isAdmin() ? ("Адрес отправителя: " + object.sender_address + "\n") : "") : "") +
|
||||
(Global.mainModule.HasAccount() ? (Global.mainModule.getAccount().isAdmin() ? ("Адрес отправителя: " + object.sender_address + "\n") : "") : "") +
|
||||
"Версия SAPFOR: " + object.sapfor_version + "\n" +
|
||||
"Версия визуализатора: " + object.visualiser_version + "\n" +
|
||||
"----------------------------------\n" +
|
||||
|
||||
Reference in New Issue
Block a user