The CreatorCon Call for Content is officially open! Get started here.

How to customize service portal activity stream Widget "Ticket Conversations"

Kevin McGartlan
Tera Contributor

Hello,

I have a requirement to enable the Time/Date stamp underneath the activity stream posts which currently show "2h ago" instead of a YYYY-MM-DD format which we want to display too. I have cloned the Form widget and the Ticket Conversation widget so I can customize the two to meet this requirement. I edited the Form widget to generate the copy of ticket conversations widget like so: 

fm.widgetInstance = $sp.getWidget('widget-copy-of-ticket-conversations',
                      {table: data.table,
                       sys_id: data.sys_id,
                        includeExtended: true,
                        title: "${Activity}",
                        use_dynamic_placeholder: true,
                        btnLabel: "${Post}"});

However, now when I open an incident form, I'm presented with the following screen which doesn't show any ticket conversation widget:

find_real_file.png

Does anyone have any idea how to get the cloned ticket conversation widget to display? I tried to make sure that the correct angular dependencies and templates are in the related list for the Copy of Form widget I had created. I also replaced the OOTB Form widget on the Form page to the Copy of Form widget I cloned to ensure it's opening the correct widget. 

I'm thinking that it may be the else condition: 

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

I'm not sure how to correctly change the .getWidget call to call the correct widget as I'm not sure how the "fm" formatter will handle it.

Also, just to complicate further, I see that the OOTB Form widget has 3 angular-ng-templates. I cannot find a way to do an "insert-and-stay" for these 3 angular-ng-templates since the id's are matching. What is the process of creating new angular templates so I can correctly 100% match my newly created Form widget with the OOTB widget? 

Thank you for your help in advance!

1 ACCEPTED SOLUTION

Can you confirm, you have added work notes and additional comments to your form using form layout. Without which, form-model mayn't be able to identify wether to add the activity widget.


Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

8 REPLIES 8

Yes. Because on Form widget, you dont have ticket conversation out of box. You will have to add it in the HTML part.

If you open the record using ticket page, you will notice, ticket-conversation is added as a separate widget on the page and not as embedded widget.


Please mark this response as correct or helpful if it assisted you with your question.

We previously had the OOTB Form widget working with the Ticket Conversation widget without having to embed the widget in the HTML, which is how our service portal was previously working. The activity stream was working correctly, and I had thought I caught every occurrence of the Ticket conversation widget to enable it to display there. 

Can you confirm, you have added work notes and additional comments to your form using form layout. Without which, form-model mayn't be able to identify wether to add the activity widget.


Please mark this response as correct or helpful if it assisted you with your question.

Oh wow... syntax error there. The ID of my widget had an extra s on it...

I really appreciate your continued support. You did point me in the right direction, because I did end up embedding the widget into the HTML. 

Thank you!