more bug info in bugtab
This commit is contained in:
parent
bcadd46b82
commit
2f146b76be
3 changed files with 16 additions and 2 deletions
|
@ -36,7 +36,7 @@ public abstract class Queries {
|
|||
.on(stacktrace1.bug.eq(bug))
|
||||
.leftJoin(report)
|
||||
.on(report.stacktrace.eq(stacktrace1))
|
||||
.select(new QVBug(bug, report.date.max(), report.count()))
|
||||
.select(new QVBug(bug, report.date.max(), report.count(), stacktrace1.versionCode.max(), report.installationId.countDistinct()))
|
||||
.groupBy(bug);
|
||||
private static final JPAQuery<VApp> V_APP = new JPAQuery<>().from(app)
|
||||
.leftJoin(bug)
|
||||
|
|
|
@ -29,12 +29,16 @@ public class VBug {
|
|||
private final Bug bug;
|
||||
private final LocalDateTime lastReport;
|
||||
private final long reportCount;
|
||||
private final int highestVersionCode;
|
||||
private final long userCount;
|
||||
|
||||
@QueryProjection
|
||||
public VBug(Bug bug, LocalDateTime lastReport, long reportCount) {
|
||||
public VBug(Bug bug, LocalDateTime lastReport, long reportCount, int highestVersionCode, long userCount) {
|
||||
this.bug = bug;
|
||||
this.lastReport = lastReport;
|
||||
this.reportCount = reportCount;
|
||||
this.highestVersionCode = highestVersionCode;
|
||||
this.userCount = userCount;
|
||||
}
|
||||
|
||||
public Bug getBug() {
|
||||
|
@ -48,4 +52,12 @@ public class VBug {
|
|||
public LocalDateTime getLastReport() {
|
||||
return lastReport;
|
||||
}
|
||||
|
||||
public int getHighestVersionCode() {
|
||||
return highestVersionCode;
|
||||
}
|
||||
|
||||
public long getUserCount() {
|
||||
return userCount;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -103,6 +103,8 @@ public class BugTab implements AppTab {
|
|||
header.setComponentAlignment(hideSolved, Alignment.MIDDLE_RIGHT);
|
||||
bugs.addColumn(VBug::getReportCount,QReport.report.count(), "Reports");
|
||||
bugs.sort(bugs.addColumn(VBug::getLastReport, new TimeSpanRenderer(), QReport.report.date.max(), "Latest Report"), SortDirection.DESCENDING);
|
||||
bugs.addColumn(VBug::getHighestVersionCode, QReport.report.stacktrace.versionCode.max(), "Latest Version");
|
||||
bugs.addColumn(VBug::getUserCount, QReport.report.installationId.countDistinct(), "Affected Users");
|
||||
bugs.addColumn(bug -> bug.getBug().getTitle(), QBug.bug.title, "Title").setExpandRatio(1).setMinimumWidthFromContent(false);
|
||||
bugs.addOnClickNavigation(navigationManager, com.faendir.acra.ui.view.bug.BugView.class, bugItemClick -> String.valueOf(bugItemClick.getItem().getBug().getId()));
|
||||
bugs.addColumn(bug -> new MyCheckBox(bug.getBug().isSolved(), SecurityUtils.hasPermission(app, Permission.Level.EDIT), e -> dataService.setBugSolved(bug.getBug(), e.getValue())),
|
||||
|
|
Loading…
Reference in a new issue