<% erroneous_results = service_result.results_with_errors(include_self: false) error_count = erroneous_results.count total_count = service_result.dependent_results.map(&:result).uniq.count selected_count = selected_work_packages.count %> <% if total_count - error_count == 0 %> <%= t('work_packages.bulk.none_could_be_saved', total: total_count) %> <% else %> <%= t('work_packages.bulk.x_out_of_y_could_be_saved', failing: error_count, total: total_count, success: total_count - error_count) %> <%= t('work_packages.bulk.could_not_be_saved') %> <% end %> <% if selected_count < total_count %> <%= t('work_packages.bulk.selected_because_descendants', total: total_count, selected: selected_count) %> <% end %>