#
# Description: This method is executed when the provisioning request is auto-approved
#

# Auto-Approve request
$evm.log("info", "Checking for auto_approval")
approval_type = $evm.object['approval_type'].downcase
if approval_type == 'auto'
  $evm.log("info", "AUTO-APPROVING")
  $evm.root["miq_request"].approve("admin", "Auto-Approved")
end

#
# Description: This method is executed when the provisioning request is auto-approved
#

# Auto-Approve request
$evm.log("info", "Checking for auto_approval")
approval_type = $evm.object['approval_type'].downcase
if approval_type == 'auto'
  $evm.log("info", "AUTO-APPROVING")
  $evm.root["miq_request"].approve("admin", "Auto-Approved")
else
  $evm.log("info", "Not Auto-Approved")
  exit MIQ_ABORT
end

Automate - Service provision pending email not being sent.
Automate - Service provision pending email not being sent.

Added logic for abort with log message when approval_type was 'manual'.

This will now run pending_request and send the pending email(s).

https://bugzilla.redhat.com/show_bug.cgi?id=1380197
