- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2017 06:55 AM
Hi community, hope you are well,
I would like to know how we can hide the worknote (incident & request) for everyone on Service Portal (but have to be visible on backend) in Helsinki.
First, I tried to configure the activity formatter on the form to disable the visibility of the "worknote". Ok, it's work on serviceportal but we still have to see the worknote on the backend form.
I thought about making different views but it seems that when we modify the activity formatter, it saves it as a system property (e.g.glide.ui.incident_activity.fields), so it is not about view.
Then I saw that we can add in form design two "Activities (filtered)" fields => Are they the same? In UI15, when I select the two fields, and that I modify the activity formatter to filter the worknote, one is showing the worknote and the other not.
and this is hidding on the serviceportal the worknote
, so it seems to look like what I wanted. We certainly had to hide the first activity stream on the form by script but I tried on UI16 (We have to be in UI16), and neither of them displays the worknote.
Finally, I think that we have to hide worknote on serviceportal by changing directly the widget: Ticket conversation
On the server script we have :
"Journal_fields" is "comments" and "worknotes", how can we differenciate them and only take the additional comments?
Do you have any idea about this? a workaround?
Thank you a lot in advance,
Solved! Go to Solution.
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2017 01:50 AM
If you still want to hide the work notes, or if anybody else does, here's a solution. First, I created a new array (line 10). Then, I took the array of journal messages and iterated through it looking for work notes (lines 13-14). Anything that isn't a work note is copied into a new array (line 15). Then, I set this new array as the value of the original array, and moved all future assignments below the new code (lines 20-21). It's a bit clunky, but iterating through the original array with a for loop and removing the work notes didn't work consistently for me. This did the trick.
Steps to reproduce:
- Clone the "Ticket Conversations" widget (since ticket conversations are OOB and read only), and place the cloned one on your page.
- Replace the mergeStreamEntries() function (lines 86-111) in the client script with the following code:
function mergeStreamEntries() {
$scope.placeholder = $scope.data.placeholderNoEntries;
if (!$scope.data.stream || !$scope.data.stream.entries)
return;
$scope.placeholder = $scope.data.placeholder;
var newEntries = [];
$scope.data.stream.entries.forEach(function(entry) {
if (entry.element != "work_notes") {
newEntries.push(entry);
}
});
$scope.data.stream.entries = newEntries;
var entries = $scope.data.stream.entries;
if (!$scope.data.mergedEntries) {
$scope.data.mergedEntries = $scope.data.stream.entries.slice();
for (var i = 0; i < entries.length; i++) {
existingEntries[entries[i].sys_id] = true;
}
return;
}
var mergedEntries = $scope.data.mergedEntries;
for (var i = entries.length - 1; i >= 0; i--) {
var curEntry = entries[i];
if (existingEntries[curEntry.sys_id])
continue;
mergedEntries.unshift(curEntry);
existingEntries[curEntry.sys_id] = true;
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-15-2017 07:53 AM
Hi Jaspal,
Would you mind posting the contents of your client script and server script? I can take a look and let you know.
Also, can you confirm that once you created the cloned widget, you replaced the widget on the page with the updated version via the page designer? I'm sure that you probably did, but I've neglected to do that myself more than a few times.
Best,
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2021 03:25 AM
HI Jaspal Singh,
Can you please help on this am unable to achieve this.
I tired same thing but no luck..
Thanks,
Vijay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2017 12:57 AM
Hi Alex,
I had to do it yesterday finally and... yes! Your code works perfectly, thanks a lot!
Kind Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2017 06:16 AM
Great! Glad to know you were able to get it working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2017 10:29 PM
Hi alex,
Can we also log the emails triggered from that ticket in ticket conversation widget ?
Any solution or suggestion is appreciated.
Thanks and reagrds,
Ruthra.v