Incident field in the activity log of Service Portal

salu
Mega Guru

Hello All,

This really urgent requirement for us.

We need to add the fields from the incident record   in the activity log.

In CMS it was coming like below

find_real_file.png

But in the Service portal,

find_real_file.png

I can only see the comments.

How this fields can be added..

Can some please help me this issue..

Its really bit urgent

Thanks

Saranya

16 REPLIES 16

larstange



Hello Lars,


Do you have any suggestion on this?



Thanks


Saranya


Hi Anurag,

I see this post if from 3 years ago, but wanted to see if you had some more specifics for how to add the fields I want to show up in the "Ticket Conversation" widget in the portal.  I've cloned the "Ticket Conversations" widget and am tinkering with the Server Script, but not sure where to add what I need, which is the Activity logs for the "State" field.  Any help would be appreciated.  Thanks!

Shamma Negi
Kilo Sage
Kilo Sage

Hi Saranya,



In service portal, you can add secondary field by editing the widget.



See the screenshot below:



find_real_file.png



The blue button at the right.



Hope this helps you.



Regards,


Shamma


Regards,Shamma Negi

Hello Shamma,


I want to have the field in the activity log similar to the CMS which I provided in tmy earlier screen shot.




In the form widget, they are hard coding the activity formatter.




/ Activity formatter is hardcoded to set specific options


  for (var f in data.f._formatters) {


  var fm = data.f._formatters[f];


  if (fm.formatter == "activity.xml") {


  fm.hardcoded = true;


  fm.widgetInstance = $sp.getWidget('widget-ticket-conversation',


  {table: data.table,


  sys_id: data.sys_id,


  includeExtended: true,


  title: "${Activity}",


  placeholder: "${Add a comment}",


  btnLabel: "${Post}"});


  } else


  fm.widgetInstance = $sp.getWidget(fm.widget, data);



Thanks


Saranya


Looks like you need to update the widget: "widget-ticket-conversation" below is where you would start. make sure the server script retrieves the data that you want to display. If you already found a solution, please post yours.



HTML


                            <div class="timeline-panel timeline-panel-first-item">


                          <div class="timeline-heading">


                              <h4 class="timeline-title">{{data.stream.user_full_name}}</h4>


                              <p>


                                  <small class="text-muted">


                                      <span class="glyphicon glyphicon-time " />


                                      <sn-time-ago timestamp="data.created_on" />


                                  </small>


                              </p>


                          </div>


                          <div class="timeline-body">


                              <p>{{data.number}} ${Created}</p>


                          </div>


                      </div>



Server Script:


                  data.number = gr.getDisplayValue('number');