Service Portal widget-ticket-conversations: what role is required for the user to be able to access the journal_fields from the sc-req-item table stream data?

Janet Grace
Kilo Contributor

Hi,  I am using a clone of the Form widget to display fields, variables and the the data from the widget-ticket-conversations for the activity.xml formatter.  Some users cannot see the work notes associated with the requested item due to permissions restrictions in widget-ticket-conversations.  I found that the itil role will allow the user to access the work notes but hesitate to give the many users that role.  I am looking for the specific role that the user requires.  The related code in the widget-ticket-conversations follows and a screen shot of the widget is attached.  Thanks in advance.

data.canWrite = gr.canWrite();
data.canAttach = gs.hasRole(gs.getProperty("glide.attachment.role")) && GlideTableDescriptor.get(data.table).getED().getAttribute("no_attachment") != "true";
data.canRead = gr.canRead();
data.hasWritableJournalField = false;
data.hasReadableJournalField = false;
if (data.canRead && !data.isNewRecord) {
data.stream = $sp.getStream(data.table, data.sys_id);
// Journal fields come in correct order already
// so grab the first 2 writeable fields
if ('journal_fields' in data.stream) {
var jf = data.stream.journal_fields;
for(var i=0; i < jf.length; i++){
if (jf[i].can_read === true)
data.hasReadableJournalField = true;
if (jf[i].can_write === true){
data.hasWritableJournalField = true;
if (!data.primaryJournalField)
data.primaryJournalField = jf[i];
else if (data.includeExtended && !data.secondaryJournalField)
data.secondaryJournalField = jf[i];
else
break;
}
}
}

}

 

 

2 REPLIES 2

Ashutosh Munot1
Kilo Patron
Kilo Patron

HI,

We need ITIL role for Worknotes to be visible. We have ACL On worknotes field. If you hesitate to give itil role then you can do it based on requested for or requested by.


Edit acl based on your requirement.


Thanks,
Ashutosh

Janet Grace
Kilo Contributor

Thank you very much for the reply Ashutosh.  I ended up cloning the widget-ticket-conversations and implementing a different user role base for allowing the user to see the worknotes and that overrides the ACL.  

 

Have a great day!

Janet