Approver cannot see the full comments on the Approval form in portal view

Dileep2
Tera Contributor

Hi All,

 

Approver cannot see the complete comments in the comments field in the Portal view, but in the backend it's visible.

 

Please check the screenshot and kindly suggest the solution.

 

Thank you

10 REPLIES 10

You have to check which widget is that and how that widget HTML/CSS is configured.

Ctrl + RightClick on that form. 

Then click on Open Widget in Editor. There you can find the widget configuration.

 

Regards,

Sumanth

Hi Sumanth,

 

Thanks for your reply.

 

I did checked the HTML, CSS, CLient and Server Script in the Widget configuration, but I dont see any thing related to "Comments" field.

 

Please see the script attached.

 

HTML

 

<div ng-if="!data.isValid">
  ${Record not found}
</div>
<div ng-if="data.isValid">
  <div class="panel panel-primary b">
    <div class="panel-heading">
      <h4 class="panel-title">${Approval request for {{::task.table}} {{::task.number.display_value}}}</h4>
    </div>

    <div class="panel-body">
      <legend class="h4 ng-binding">{{::task.short_description.display_value}}</legend>
      <div class="vsplit col-sm-6">
        <div ng-if="task.opened_by"><label class="caption">${Opened by} </label>
          <input class="form-control" ng-model="task.opened_by.display_value" ng-readonly="true"  type="string">
        </div>
        <div ng-if="task.requested_by"><label class="caption">${Requestor} </label>
          <input class="form-control" ng-model="task.requested_by.display_value" ng-readonly="true"  type="string">
        </div>
        <div ng-if="::data.approver"><label class="caption">${Approver}</label>
          <input class="form-control" ng-model="data.approver" ng-readonly="true"  type="string">
        </div>
        <!-- Change Fields -->
        <div ng-if="task.type"><label class="caption">${Change Level}</label>
          <input class="form-control" ng-model="task.type.display_value" ng-readonly="true"  type="string">
        </div>
        <div ng-if="task.category"><label class="caption">${Category}</label>
          <input class="form-control" ng-model="task.category.display_value" ng-readonly="true"  type="string">
        </div>
        <div ng-if="task.u_hana_subcategory"><label class="caption">${Subcategory}</label>
          <input class="form-control" ng-model="task.u_hana_subcategory.display_value" ng-readonly="true"  type="string">
        </div>
        <div ng-if="task.u_subcategory"><label class="caption">${Type}</label>
          <input class="form-control" ng-model="task.u_subcategory.display_value" ng-readonly="true"  type="string">
        </div>
      </div>
      <div class="vsplit col-sm-6">
        <div ng-if="task.start_date"><label class="caption">${Start}</label>
          <input class="form-control" ng-model="task.start_date.display_value" ng-readonly="true"  type="string">
        </div>
        <div ng-if="task.end_date"><label class="caption">${End}</label>
          <input class="form-control" ng-model="task.end_date.display_value" ng-readonly="true"  type="string">
        </div>
        <!-- Change Fields -->
        <div ng-if="task.u_request_from_business"><label class="caption">${Request from Business}</label>
          <input class="form-control" ng-model="task.u_request_from_business.display_value" ng-readonly="true"  type="string">
        </div>
        <div ng-if="task.impact  && task.table=='Change Request'"><label class="caption">${Impact}</label>
          <input class="form-control" ng-model="task.impact.display_value" ng-readonly="true"  type="string">
        </div>
        <div ng-if="task.risk"><label class="caption">${Risk}</label>
          <input class="form-control" ng-model="task.risk.display_value" ng-readonly="true"  type="string">
        </div>
        <div ng-if="task.risk_value"><label class="caption">${Risk value}</label>
          <input class="form-control" ng-model="task.risk_value.display_value" ng-readonly="true"  type="string">
        </div>
      </div>
      <div class="col-sm-12">
        <div ng-if="task.description && task.table=='Change Request'"><label class="caption">${Description}</label>
          <textarea class="form-control" ng-model="task.description.display_value" ng-readonly="true"></textarea>
        </div>
        <div ng-if="task.justification"><label class="caption">${Justification}</label>
          <textarea class="form-control" ng-model="task.justification.display_value" ng-readonly="true"></textarea>
        </div>
        <div ng-if="task.implementation_plan"><label class="caption">${Implementation plan}</label>
          <textarea class="form-control" ng-model="task.implementation_plan.display_value" ng-readonly="true"></textarea>
        </div>
        <div ng-if="task.risk_impact_analysis"><label class="caption">${Risk and impact analysis}</label>
          <textarea class="form-control" ng-model="task.risk_impact_analysis.display_value" ng-readonly="true"></textarea>
        </div>
        <div ng-if="task.backout_plan"><label class="caption">${Backout plan}</label>
          <textarea class="form-control" ng-model="task.backout_plan.display_value" ng-readonly="true"></textarea>
        </div>
        <div ng-if="task.test_plan"><label class="caption">${Test plan}</label>
          <textarea class="form-control" ng-model="task.test_plan.display_value" ng-readonly="true"></textarea>
        </div>
        <div ng-if="task.price.value > 0"><label class="caption">${Price}</label>
          <input class="form-control" ng-model="task.price.display_value" ng-readonly="true"  type="string">
          <span ng-if="task.recurring_frequency.value != null"><label class="caption">${Recurring price}</label>
            {{task.recurring_frequency.display_value}}</span>
        </div>

        <div ng-if="data.items.length > 0">
          <h4>${Items in this Request}</h4>
          <div ng-repeat="item in data.items">
            <h4>
              {{::item.short_description}}
            </h4>

            <div ng-if="item.price">${Price} {{::item.price}}
              <span ng-if="item.recurring_price">${Recurring price} {{::item.recurring_price}} {{::item.recurring_frequency}}</span>
            </div>

            <div ng-if="item.variables.length > 0" ng-init="variable_toggle=false">
              <h5 ng-click="variable_toggle = !variable_toggle" style="cursor: pointer;">
                <span class="glyphicon" ng-class="{'glyphicon-chevron-down': !variable_toggle, 'glyphicon-chevron-up': variable_toggle}"></span>
                ${Options}
              </h5>
              <div ng-repeat="variable in item.variables | filter:{visible_summary:true}" class="m-b-xs" ng-if="variable_toggle">
                <div><label class="caption">{{::variable.label}}</label>
                  <input class="form-control" ng-model="variable.display_value" ng-readonly="true"  type="string">
                </div>   
              </div>
            </div>

          </div>
        </div>

        <div ng-if="data.variables.length > 0" ng-init="variable_toggle=true">
          <h4 ng-click="variable_toggle = !variable_toggle" style="cursor: pointer;">
            <span class="glyphicon" ng-class="{'glyphicon-chevron-down': !variable_toggle, 'glyphicon-chevron-up': variable_toggle}"></span>
            ${Options}
          </h4>
          <div ng-repeat="variable in data.variables | filter:{visible_summary:true}" ng-if="variable_toggle">
            <div><label class="caption">{{::variable.label}}</label>
              <input class="form-control" ng-model="variable.display_value" ng-readonly="true"  type="string">
            </div>
          </div>
        </div>
      </div>
    </div>
    <!-- <sp-widget widget="data.ticketConversation" /> -->
  </div>
</div>

 

Server Script 

 

(function() {
	// g_approval_form_request is for approval summarizer ACLs
	// that let user read a record they need to approve. This global
	// variable is then deleted at the bottom of the script
	g_approval_form_request = true;
	var gr = $sp.getRecord();
	if (gr == null || !gr.isValid()) {
		data.isValid = false;
		return;
	}
	if (gr.getValue("approver") != gs.getUserID())
		data.approver = gr.approver.getDisplayValue();
	data.isValid = true;
	var task = getRecordBeingApproved(gr);
	if (task == null) {
		data.isValid = false;
		return;
	}

	var t = {};
	t = $sp.getFieldsObject(task, 'number,short_description,opened_by,requested_by,start_date,end_date,quantity,price,recurring_price,recurring_frequency,type,category,u_hana_subcategory,u_subcategory,u_request_from_business,impact,risk,risk_value,description,justification,implementation_plan,risk_impact_analysis,backout_plan,test_plan');
	t.table = task.getLabel();
	
	var items = [];
	var idx = 0;
	var itemsGR = new GlideRecord("sc_req_item");
	itemsGR.addQuery("request", task.sys_id);
	itemsGR.query();
	while (itemsGR.next()) {
	  var item = {};
	  item.short_description = itemsGR.short_description.toString();
	  if (itemsGR.getValue("price") > 0)
		  item.price = itemsGR.getDisplayValue("price");

	  if (itemsGR.getValue("recurring_price") > 0) {
		  item.recurring_price = itemsGR.getDisplayValue("recurring_price");
			item.recurring_frequency = itemsGR.getDisplayValue("recurring_frequency");
	  }

	  if (itemsGR)
		  item.variables = $sp.getRecordVariablesArray(itemsGR);

	  items[idx] = item;
	  idx++;
	}

	data.items = items;
	data.sys_id = gr.getUniqueValue();
	data.task = t;
		
	
	if (task)
	  data.variables = $sp.getRecordVariablesArray(task);

	function getRecordBeingApproved(gr) {
		var approvalTargetRecord;
	  if (!gr.sysapproval.nil())
			approvalTargetRecord = gr.sysapproval.getRefRecord();
		else
			approvalTargetRecord = gr.document_id.getRefRecord();
		
		return (approvalTargetRecord.canRead()) ? approvalTargetRecord : null;
	}

	var ticketConversationOptions = {
		sys_id: task.getUniqueValue(),
		table: task.getTableName(),
		title: gs.getMessage("Activity Stream"),
		placeholder: gs.getMessage("Type your message here..."),
		placeholderNoEntries: gs.getMessage("Start a conversation..."),
		btnLabel: gs.getMessage("Send")
	};

	data.ticketConversation = $sp.getWidget('widget-ticket-conversation', ticketConversationOptions);
	delete g_approval_form_request;
})();

 

The above script is from the Widget and have attached Client and CSS as screenshot. Please check and suggest.

 

Thank you

Is it a record producer produced record and those are variables?

it's a catalog item submitted record

GlideFather
Tera Patron

I tried to replicate the issue, but our Approval form is different and I do not want to customise it then...

Please, can you check the form of the table from where the record is pending approval?
If it is RITM, please check the record in the backend, and check the field type, eventually max character in the sys_dictionary...

I would navigate to the record in the backend and I would check the "Comment" field and its configurations, or if it is a variable, then the same... as the fields like "VPN" and similar are not part of the Approval table, then it is not related to it.

Please, try this and eventually provide more details about the field - where it is originating from?

———
/* If my response wasn’t a total disaster ↙️ drop a Kudos or Accept as Solution ↘️ Cheers! */