PC-966 When selecting a new report for a user to handle, always
prioritise reports assigned to teams that the user is a member of
This commit is contained in:
parent
5ad4f2831d
commit
425d814ac4
|
@ -71,7 +71,17 @@ public class ReportHandleCommand extends CommandBase<ReportPlugin>
|
|||
|
||||
for (Map.Entry<Report, Double> entry : reportPriorities.entrySet())
|
||||
{
|
||||
if (mostImportant == null || entry.getValue() > mostImportant.getValue())
|
||||
Report report = entry.getKey();
|
||||
double priority = entry.getValue();
|
||||
|
||||
// reports assigned to user team are always prioritised
|
||||
if (report.getAssignedTeam().isPresent())
|
||||
{
|
||||
mostImportant = entry;
|
||||
break;
|
||||
}
|
||||
|
||||
if (mostImportant == null || priority > mostImportant.getValue())
|
||||
{
|
||||
mostImportant = entry;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue