Standard Ticket Conversations Widget: How to Set Enter Key Adds New Line

Kyle Krick
Giga Contributor

I've upgraded a test instance to Quebec from Orlando (skipped Paris) and I noticed the new Ticket page (/sp?id=ticket) widgets. The Standard Ticket Tab widget loads/pulls in the new Standard Ticket Conversations widget. This new conversation widget does not have an option to specify what hitting the enter key does (either enter a new line, or submit the comment). I've poked through the code of the Standard Ticket Conversations widget and see that it's Client Script is checking for a setting to determine the behavior in line 335-336:

if ($scope.data.enterKeyAddsNewLine)
    return; // must click Send button to submit 

Does anyone know where $scope.data.enterKeyAddsNewLine is defined? I know there was a system property (glide.service_portal.comment.enter_adds_newline) that the old ticket conversations widget could be configured to check, but setting that system property does not seem to affect this new widget.

This is a significant issue due to user habits and training, so it's holding up the upgrade to Quebec.

1 ACCEPTED SOLUTION

Interesting and I'm not sure if this is an oversight.

The std_ticket_conversation contains the following to assess whether to use a new line or not:

data.enterKeyAddsNewLine = false;
	if (options.enter_key_behavior == "System property")
		data.enterKeyAddsNewLine = gs.getProperty("glide.service_portal.comment.enter_adds_newline") == "true";
	else if (options.enter_key_behavior == "New line")
		data.enterKeyAddsNewLine = true;

But the standard ticket tab widget doesn't pass a property with the getWidget. I'd expect a "enter_key_behaviour" as part of the object.

find_real_file.png

I'm not sure what support (HI) will say / whether they'll just advise to clone the widget.

View solution in original post

9 REPLIES 9

Kieran Anson
Kilo Patron

Hi Kyle,

If you open chrome dev tools whilst on the ticket page and use the element selector to select the frame just outside the textbox, you can then enter $($0).scope().data in your console to see what the data object is. When the property is set to true, is the data.enterKeyAddsNewLine showing as true?

find_real_file.png

It shows the enterKeyAddsNewLine property with a value of false.

 

find_real_file.png

 

Any idea how to set that property? If I manually switch it to true, then the widget functions as desired.

Is the system property glide.service_portal.comment.enter_adds_newline set to true in your environment? It should be reading from that system property.

Hi Kieran,

 

Yep, I've set that system property to true.

find_real_file.png