Difference between revisions of "Add Ticket and CI Links to Announcements"
m (→Step 1. Edit the detail_cnote.htmpl form) |
|||
| Line 13: | Line 13: | ||
== Procedures == | == Procedures == | ||
=== Step 1. Edit the detail_cnote.htmpl form === | === Step 1. Edit the detail_cnote.htmpl form === | ||
| − | In the body of the form, replace the entire bottom of the form beginning with | + | In the body of the form, replace the entire bottom of the form beginning with <nowiki><!-- handles the 'insert link' functionality --></nowiki> with the content provided below. |
<source lang="javascript"><!-- handles the 'insert link' functionality --> | <source lang="javascript"><!-- handles the 'insert link' functionality --> | ||
<PDM_IF "$env.NX_CMDB" != "STANDALONE"> | <PDM_IF "$env.NX_CMDB" != "STANDALONE"> | ||
| Line 251: | Line 251: | ||
</HTML></source> | </HTML></source> | ||
| − | For r11.x releases it is recommended that you edit your pages via the [[Web Screen Painter]]. | + | For r11.x releases it is recommended that you edit your pages via the [[Web Screen Painter]]. |
=== Step 2. Clear the web cache === | === Step 2. Clear the web cache === | ||
Latest revision as of 15:22, 6 January 2009
To discuss or ask questions about this article, select the discussion tab above.
Overview
This article provides instructions on how to insert active links to Requests, Incidents, Problems, Issues, Change Orders, and Configuration Items (aka Assets) to an Announcement.
Procedures
Step 1. Edit the detail_cnote.htmpl form
In the body of the form, replace the entire bottom of the form beginning with <!-- handles the 'insert link' functionality --> with the content provided below.
<source lang="javascript">
<PDM_IF "$env.NX_CMDB" != "STANDALONE">
<PDM_IF "$prop.form_name_3" == "edit">
| Insert Object link | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
<PDM_FORM NAME=INSERT_FORM> <input type=hidden name="KEY.linkItem" id="KEY.linkItem"> <input type=hidden name='SET.linkItem' id='SET.linkItem'> <input type=hidden name="obj_flag" id="obj_flag">
<script type="text/javascript"> // To capture persid of returned item var curPersid = ""; function backfill_event(momform, field_name, what2fill, persid, rel_attr_val) { if ( field_name == "SET.linkItem" && typeof persid == "string" && persid.length > 0 ) {
var commonName = document.getElementById("SET.linkItem").value; ImgBtnEnableButton("InsertItem"); curPersid = persid; var currId = persid.substring(3); var obj = persid.substring(0,2); document.getElementById("SET.linkItem").value = currId; document.getElementById("obj_flag").value = obj; if ( obj == "KD") { document.getElementById("linkitemID").innerHTML = "Doc " + currId; } else { var obj_desc = ""; switch ( obj ) { case "cr" : obj_desc = "Req/Inc/Prb "; break; case "ch" : obj_desc = "Change "; break; case "is" : obj_desc = "Issue "; break; case "nr" : obj_desc = "Config. Item "; break; } document.getElementById("linkitemID").innerHTML = obj_desc + commonName; } var e = document.getElementById(linktextID); e.value = commonName; e.focus(); } } // Inserts and HTML link into the announcement text function do_insert() { if (null != curPersid && curPersid.length > 0) { var key_val = document.getElementById(linktextID).value; if (typeof key_val == "undefined" || key_val == null || key_val.length <= 0) { alert(msgtext(727)); return; } var el_text = findElem("SET.text"); var doc_id = curPersid.match(/[0-9]+/); if (document.getElementById("obj_flag").value == "KD") { var link_txt = "<A HREF=\"javascript:OpenDocumentViewer(" + doc_id + ", 2);\">"; } else { var link_txt = "<A HREF=\"javascript:showDetailWithPersid('" + curPersid + "');\">"; } link_txt += key_val + "</a>"; el_text.value = el_text.value + link_txt; } } </script> </pdm_form> | |||||||||||||
</PDM_IF> </pdm_if>
<PDM_INCLUDE FILE=std_footer.htmpl> </BODY> </HTML></source>
For r11.x releases it is recommended that you edit your pages via the Web Screen Painter.
Step 2. Clear the web cache
The final step is to clear Service Desk's cache. The methods vary depending on release.
For r11.x releases publish your changes via the Web Screen Painter. The process of publishing automatically initiates a pdm_webcache.
