Skip to content

Commit

Permalink
#979 Update the UI to allow null value for task owner
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed Jul 3, 2019
1 parent 091b401 commit feb2e38
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ui/app/scripts/filters/getField.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
'use strict';
angular.module('theHiveFilters').filter('getField', function() {
return function(obj, param) {
if (angular.isDefined(obj)) {
if (obj !== undefined && obj !== null) {
return obj[param];
} else {
return '';
Expand Down
15 changes: 10 additions & 5 deletions ui/app/views/partials/case/case.tasks.item.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,16 @@ <h4 class="mb-xs text-primary">

<dl class="dl-horizontal" ng-class="{'Completed': 'text-success', 'InProgress': 'text-warning'}[task.status]">
<dt class="pull-left">Duration</dt>
<dd ng-show="task.status === 'Completed'">
Closed after <em ng-bind="(task.endDate - task.startDate) | amDurationFormat : 'milliseconds'"></em>
</dd>
<dd ng-show="task.status === 'InProgress'">
Started <em am-time-ago="task.startDate"></em>
<dd ng-switch="task.status">
<span ng-switch-when="Completed">
Closed after <em ng-bind="(task.endDate - task.startDate) | amDurationFormat : 'milliseconds'"></em>
</span>
<span ng-switch-when="InProgress">
Started <em am-time-ago="task.startDate"></em>
</span>
<span ng-switch-default>
Not started yet
</span>
</dd>
</dl>

Expand Down

0 comments on commit feb2e38

Please sign in to comment.