Name

sn_deploy_pipeline.DeploymentRequestFailedAppEngineAdminEmailUtil

Description

No description available

Script

var DeploymentRequestFailedAppEngineAdminEmailUtil = Class.create();
DeploymentRequestFailedAppEngineAdminEmailUtil.prototype = {
  initialize: function() {},

  getSubject: function(deploymentRequestRecord) {
      var appName = deploymentRequestRecord.getDisplayValue("app_name");

      return gs.getMessage("Publish failed for {0}", appName);
  },

  getPublishFailedEmailBodyForAppEngineAdmin: function(deploymentRequestRecord) {
      var appName = deploymentRequestRecord.getDisplayValue("app_name");

      var appEngineEmailScript = new sn_app_eng_notify.AppEngineEmailScript();

      // heading
      var heading = gs.getMessage("Publishing failed for {0}", appName);
      appEngineEmailScript.addHeading(heading);

      // greeting
      var greeting = gs.getMessage("Hi,");
      appEngineEmailScript.addText(greeting, false);

      // message
      var message = gs.getMessage("Something went wrong with {0} during publish to app repo. The request to deploy this app has been closed.", appName);

      appEngineEmailScript.addText(message, true);
  	
  	var buttonText = gs.getMessage("Go to the request");
  	var deploymentRequestUrl = deploymentRequestRecord.getLink();
  	
  	appEngineEmailScript.addButton(buttonText, deploymentRequestUrl);

      return appEngineEmailScript.getBody();
  },

  type: 'DeploymentRequestFailedAppEngineAdminEmailUtil'
};

Sys ID

1f6e2bbdc3133010a9f5e548fa40dd4f

Offical Documentation

Official Docs: