File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 113113 "Task execution" ,
114114 "error"
115115 ) ;
116+ $scope . errors . push ( new Error ( "Task execution encountered errors. See execution logs for more details" ) ) ;
117+ $scope . state = "error" ;
116118 } else {
117119 CRM . alert ( "Task execution completed" , "Task execution" , "success" ) ;
120+ $scope . state = "done" ;
118121 }
119122
120- $scope . state = "done" ;
121123 $scope . logs = taskExecResult . values . logs ;
122124 $scope . runButtonLabel = "Run again" ;
123125 $scope . $apply ( ) ;
154156
155157 if ( $scope . state === "done" ) {
156158 if ( execution . error_count > 0 ) {
159+ $scope . state = "error" ;
160+ $scope . errors . push ( new Error ( "Task execution encountered errors. See execution logs for more details" ) ) ;
161+ $scope . $apply ( ) ;
157162 CRM . alert (
158163 "Task execution encountered errors. See execution logs for more details" ,
159164 "Task execution" ,
Original file line number Diff line number Diff line change @@ -25,7 +25,8 @@ <h1 crm-page-title>{{ts('Run SQL task:')}} {{task.name}}</h1>
2525 </ div >
2626
2727 < div class ="str__errors crm-error " ng-if ="state === 'error' ">
28- < ul >
28+ < span ng-if ="errors.length == 1 "> {{errors[0].message}}</ span >
29+ < ul ng-if ="errors.length > 1 ">
2930 < li ng-repeat ="error in errors "> {{error.message}}</ li >
3031 </ ul >
3132 </ div >
You can’t perform that action at this time.
0 commit comments