Service Desk Practitioners Forum
cancel

Service Pages customization help

SOLVED
Go to solution
Highlighted
Jake Lundberg (
Outstanding Contributor.

Service Pages customization help

I'm very new to Java/JSP (read: Just learning today) and want to know if what I'm trying to do is fairly simple or complex.

Basically I want to display history for a reduced set of string matches. For instance, I don't want to display all status changes, assignments and things like that. I just want to display any history lines with a Subject or information matching "history_entry".

Looking through the jsp files, it appears I'd have to change ViewServiceCallHistory$jsp.jsp possibly around:

for (int i=0 ; i IHistoryLineServicecall hl = hls[i];
IRegistration reg = hl.getRegistration();
IAccount _created_by = reg.getCreatedby();
String created_by = _created_by != null ? _created_by.getLoginName() : "";
Double created = reg.getCreated();
String subject = hl.getSubject(), information = hl.getInformation();

But I'm not sure. Maybe something like

String subject = hl.getSubject() if hl.getSubject() =~ /history_entry/ (pseudo-perl'd)

Thanks...
It is your mind that creates this world
3 REPLIES
Jan Schepers
Super Contributor.
Solution

Re: Service Pages customization help

In the part where you are printing the history lines to the screen you can indeed do something like:

if subject.indexOf("history_entry") >= 0 {
%>
" >
<%= SdClientBean.filter_html_string(subject) %>
<%= SdClientBean.filter_html_string(information) %>
<%= created != null ? bean.sd_date2java_local_date(created) : "" %>
<%= SdClientBean.filter_html_string(created_by) %>

<%
}

The subject.indexOf returns -1 if the substring doesn't occur in subject and returns the start position if it does. Also take into account that inexOf is case sensitive.
Jake Lundberg (
Outstanding Contributor.

Re: Service Pages customization help

That was exactly what I needed. Thanks for the help!
It is your mind that creates this world
Jake Lundberg (
Outstanding Contributor.

Re: Service Pages customization help

Thanks!
It is your mind that creates this world