Video Screencast Help
Search Video Help Close Back
to help
New in the Rewards Catalog: Vouchers for "Symantec Technical Specialist" and "Symantec Certified Specialist" exams.

Comment visible to guests

Updated: 21 May 2010 | 7 comments
Kemcinte's picture
0 0 Votes
Login to vote
This issue has been solved. See solution.

Hello,

Does anyone have a customization to remove this from the Incident screen?

[ ] Comment visible to guests

Comments

mclemson's picture
16
Feb
2010
1 Vote +1
Login to vote

Modify WorkItemEdit.ascx and subWorkItemEditGeneral.ascx

How it works


In the file WorkItemEdit.ascx, if workitem_comment_visible_to_guest="1" then a particular row (comment) is visible to the guest: r("not_visible_to_guest") = "false", otherwise, r("not_visible_to_guest") = "true" and the guest can't see it.

The value for workitem_comment_visible_to_guest comes from subWorkItemEditGeneral.ascx, when the user interacts with this CheckBox control:

 <aw:CheckBox id="cbVisibleToGuest" runat="server" label=" " ColSpan="3" ItemDataField="workitem_comment_visible_to_guest" valuechecked="1" valueunchecked="0" text="sidCommentVisibleToGuests"></aw:CheckBox>

The text to display for this control is sidCommentVisibletoGuests, which is set to "Comment visible to guests".  It says if they check the box next to 'Comment visible to guests,' then the value of workitem_comment_visible_to_guest is 1, and if they uncheck the box, then the value of workitem_comment_visible_to_guest is 0.

Problem

The trouble is, if you remove the checkbox control, you will never pass a value of 1 to the control, and no comment will be visible to guests.

Solution

Customize .ascx files so that the page always makes comments visible (no matter what the Checkbox tells the page) and then make the Checkbox control invisible (so that no worker can see it).  The value of the checkbox control doesn't matter because you've overridden the values by editing the page.

When making customizations to Helpdesk, always work with custom files, never modify default files.

Make a copy of your ..\Altiris\Helpdesk\AeXHD\templates\WorkItemEdit.ascx, rename it custWorkItemEdit.ascx
Modify the custWorkItemEdit.ascx from:

  if row("workitem_comment_visible_to_guest") = "1" then
   r("not_visible_to_guest") = "false"
  else
   r("not_visible_to_guest") = "true"
  end if

To this (making invisible comments always false no matter what; yes, I realize you could simplify this, but I like keeping the structure the same):
  if row("workitem_comment_visible_to_guest") = "1" then
   r("not_visible_to_guest") = "false"
  else
   r("not_visible_to_guest") = "false"
  end if

Make a copy of your ..\Altiris\Helpdesk\AeXHD\templates\subWorkItemEditGeneral.ascx, rename it custSubWorkItemEditGeneral.ascx
Modify the custSubWorkItemEditGeneral.ascx from this:

 <aw:CheckBox id="cbVisibleToGuest" runat="server" label=" " ColSpan="3" ItemDataField="workitem_comment_visible_to_guest" valuechecked="1" valueunchecked="0" text="sidCommentVisibleToGuests"></aw:CheckBox>
To this (commenting out the line):
 '<aw:CheckBox id="cbVisibleToGuest" runat="server" label=" " ColSpan="3" ItemDataField="workitem_comment_visible_to_guest" valuechecked="1" valueunchecked="0" text="sidCommentVisibleToGuests"></aw:CheckBox>

And then modify your custom.config file to include the references to the new .ascx files.
If you don't have a custom.config file, you should create one in notepad below and save it as custom.config in the AeXHD folder:
<?xml version="1.0" encoding="utf-8" ?>
<custom.configuration>
            <files path="~/custom/">
   <file id="WorkItemEdit" file="custWorkItemEdit.ascx" />
   <file id="subWorkItemEditGeneral" file="custSubWorkItemEditGeneral.ascx" />
            </files>
</custom.configuration>

Restart IIS
Restart IIS to put your changes into production.

Does this resolve the issue for you?

Mike Clemson, Systems Engineer
Intuitive Technology Group -- Symantec Platinum Partner

Kemcinte's picture
18
Feb
2010
0 Votes 0
Login to vote

I followed your instructions

I followed your instructions but this does not hide the checkbox for Comment visible to guests on the edit page of an Incident.

It looks like the commenting out the line does not work. I commeted out the other line and the pages fails to load so it is reading the custom file.

mclemson's picture
18
Feb
2010
1 Vote +1
Login to vote

Try modifying this file also

Try modifying this file as well: WorkItemEditComment.ascx

Change this line from:
<aw:CheckBox ID="chkCommentVisibleToGuests" runat="server" valuechecked="1" valueunchecked="0" text="sidVisibleToGuests" />

To this:
'<aw:CheckBox ID="chkCommentVisibleToGuests" runat="server" valuechecked="1" valueunchecked="0" text="sidVisibleToGuests" />

Remember to make a copy of the .ascx file first, rename it, and then reference it from custom.config.  And remember to restart IIS!

Does that help?

Mike Clemson, Systems Engineer
Intuitive Technology Group -- Symantec Platinum Partner

Kemcinte's picture
19
Feb
2010
0 Votes 0
Login to vote

Sorry still shows up... I

Sorry still shows up... I rechecked all of my steps..

mclemson's picture
19
Feb
2010
1 Vote +1
Login to vote

Try this instead

For any files where I've recommended commenting, try using this method of commenting instead: <%-- <your control is here> --%>

Save the files, make sure there are already references in custom.config, and restart IIS.

Mike Clemson, Systems Engineer
Intuitive Technology Group -- Symantec Platinum Partner

Kemcinte's picture
19
Feb
2010
0 Votes 0
Login to vote

Bingo!! I did not have

Bingo!!

I did not have to customize this file WorkItemEditComment.ascx

Modify the custWorkItemEdit.ascx To this (making invisible comments always false no matter what; yes, I realize you could simplify this, but I like keeping the structure the same):
  if row("workitem_comment_visible_to_guest") = "1" then
   r("not_visible_to_guest") = "false"
  else
   r("not_visible_to_guest") = "false"
  end if

Modify the custSubWorkItemEditGeneral.ascx to this:

<%-- <aw:CheckBox id="cbVisibleToGuest" runat="server" label=" " ColSpan="1" ItemDataField="workitem_comment_visible_to_guest" valuechecked="1"  valueunchecked="0"  text="sidCommentVisibleToGuests"></aw:CheckBox> --%>

Thank you so Much

mclemson's picture
19
Feb
2010
0 Votes 0
Login to vote

However..

However, if your workers can go back and edit old Comments, it is possible they could hide comments unless you also edit WorkItemEditComment.ascx.

Glad I could help!  Sorry it took a few tries; I've never modified that in my implementation.

Mike Clemson, Systems Engineer
Intuitive Technology Group -- Symantec Platinum Partner