Forums

HDU- A Service Desk User Community :: Forums :: Service Desk r11.X Support :: Customizing r11.x
 
<< Previous thread | Next thread >>
Change Impact Value in "Open" status Request
Moderators: Admin, 4uTech CEO
Author Post
post-feed
Wed Mar 03 2010, 04:44AM
Registered Member #5003
Joined: Wed May 06 2009, 07:42AM
Posts: 5
Hi,

I'm facing a problem in changing impact value in request with status = open (OP).

I'll try to explain the point.

When create a new request, the affected end user can choose the priority value, selecting the value Low, Medium or High .
The impact value in new request is automatically set equal to the priority value chosen by the affected end user.

Here is the spl code that set the impact value in the status OP (open):


//////////////////////////////////////////////////////////////////////////////////////////
// Input fields
// argv[0]: Fields number
// argv[1]: "assignee"            argv[2]: old value (db)        argv[3]: new value 
// argv[4]: "status"            argv[5]: old value (db)        argv[6]: new value 
// argv[7]: "priority"            argv[8]: old value (db)        argv[9]: new value 
// argv[10]: "impact"            argv[11]: old value (db)    argv[12]: new value 
//////////////////////////////////////////////////////////////////////////////////////////
cr::zz_cr_reset_assignee(...)
{


string pri;
pri = argv[9];

if (status == 'OP'){

send_wait(0, this, "call_attr", "assignee", "set_val", "", "SUPPRESS_TRIGGERS" );
send_wait(0, this, "call_attr", "impact", "set_val", pri, "SUPPRESS_TRIGGERS" );

......



During their work, analysts that manage the request can choose to change the impact value to a new value.
They can perform this operation using a customized function under an Activities label in their Help desk toolbar called "Change HD Priority".
(HD Priority is only a label for impact).
After choosing a new value for impact, and after saving the changes, the new impact value should be showed in the Request.
The problem is that ,If the request is in a status equal to Open (OP), the impact new value can't be set!And the old value is still showed.
For all the others request status there is no problem and the new value is correctly set.

here is the customized HTMPL file to change impact value:


<PDM_IF 0>
xfer_esc_cr.htmpl
WHEN PRESENTED:
    When the app needs input to create an activity log for Transfer or Escalate.  
INTENT:
    Capture user input for a new Activity Log, create an Activity Log and update
    Call Request when submitted.
VARIABLES:
                            See $NX_ROOT/bopcfg/majic/cm.maj for the
                            definition of attributes for 'OBJECT alg'
    int       logged_in   A flag to say we have a user login object.
    object cst    cst        A cst object (customer) that is the logged in user.
docWriteln("<INPUT TYPE=text NAME=SET.assignee VALUE='$cst.combo_name'>");
</PDM_IF>
<HTML>
<HEAD>

<PDM_PRAGMA RELEASE=60>
<PDM_INCLUDE FILE=styles.htmpl>
<script LANGUAGE="JavaScript">
alg_factory = "alg";
<PDM_IF "ESC" == "$args.alg.type">
<PDM_IF "$env.NX_OTB_MARKET" == "itil" >
form_title = "Escalate $args.type.sym $args.ref_num";
<PDM_ELSE>
form_title = "Escalate Request $args.ref_num";
</PDM_IF>
<PDM_ELSE>
<PDM_IF "$env.NX_OTB_MARKET" == "itil" >
form_title = "Change HD Priority $args.type.sym $args.ref_num";
var escalate_title = "Escalate $args.type.sym $args.ref_num";
<PDM_ELSE>
form_title = "Change HD Priority - Request $args.ref_num";
var escalate_title = "Escalate Request $args.ref_num";
</PDM_IF>
function switch_to_escalate()
{
   detailSwitchToEsc(document.main_form.elements["SET.alg.type"]);
}
</PDM_IF>
</SCRIPT>
<PDM_INCLUDE FILE=std_head.htmpl>
<script LANGUAGE="JavaScript">
edit_form = 1;
cfgMachineName = "$SESSION.MachineName";
argPersistentID = "$args.persistent_id";
argCstID = "$cst.id";
cfgDateFormat = "$date_format";
argRefNum = "$args.ref_num";
cfgUserAuth = "$UserAuth";
cfgAccessNotify = "$ACCESS.notify";
argID = "$args.id";
</SCRIPT>
<script LANGUAGE="JavaScript" SRC="$CAisd/scripts/arrow_button.js"></SCRIPT>
<script LANGUAGE="JavaScript" SRC="$CAisd/scripts/check_submit.js"></SCRIPT>
<script LANGUAGE="JavaScript" SRC="$CAisd/scripts/img_link.js"></SCRIPT>
<script LANGUAGE="JavaScript" SRC="$CAisd/scripts/detail_form.js"></SCRIPT>
<script LANGUAGE="JavaScript" SRC="$CAisd/scripts/date_helper.js"></SCRIPT>
<script LANGUAGE="JavaScript" SRC="$CAisd/scripts/convert_date.js"></SCRIPT>
<script LANGUAGE="JavaScript" SRC="$CAisd/scripts/val_type.js"></SCRIPT>
<script LANGUAGE="JavaScript" SRC="$CAisd/scripts/sitemods.js"></SCRIPT>
<script LANGUAGE="JavaScript">
function backfill_cnt_event( form_name, base_name, lname, fname, mname,
                             cntID, caller_type )
{
   detailCntBackfill( form_name, base_name, lname, fname, mname,
                      cntID, caller_type );
   detailXferEscBackfill( base_name, lname, fname, mname, cntID, caller_type );
}

function disable()
{
    if ("$args.group" != "$args.zzgr_it")

    {
        var msg="SORRY YOU ARE NOT ALLOWED TO EDIT THIS REQUEST";
        alert(msg);
        document.getElementById('df_1_0').disabled=true;
        document.getElementById('imgBtn0_button').disabled=true;
    }
}
</SCRIPT>
</HEAD>
<BODY onload="load_from_scratchpad('0')" onUnload="unload_check()" class=editform>
<PDM_INCLUDE FILE=std_body.htmpl>
<CENTER>
<script LANGUAGE="JavaScript">
parent.top_splash.next_persid = "$args.persistent_id";
_dtl = new DetailForm("cr","${args.id:0}","show_main_detail.htmpl");
startDetail();
docWriteln("<INPUT TYPE=hidden NAME=HTMPL VALUE='show_main_detail.htmpl'>");
docWriteln("<INPUT TYPE=hidden NAME=KEEP.IsModified VALUE='1'>");
docWriteln("<INPUT TYPE=hidden NAME=SET.alg.type VALUE='$args.alg.type'>");


<PDM_MACRO NAME=dtlStartRow>
<PDM_IF "$env.NX_OTB_MARKET" == "itil" >
    <PDM_MACRO NAME=dtlReadonly hdr="$args.type.sym Number"  attr=ref_num>
    <PDM_MACRO NAME=dtlTextbox hdr="$args.type.sym Summary" attr=summary colspan=2>
<PDM_ELSE>
    <PDM_MACRO NAME=dtlReadonly hdr="Request Summary" attr=summary>
</PDM_IF>
var prio_id = _dtl.currID;
var assignee_id = _dtl.currID;

<PDM_MACRO NAME=dtlStartRow>
<PDM_MACRO NAME=dtlReadonly hdr="Current HD Priority"  attr=impact>
<PDM_MACRO NAME=dtlDropdown hdr="New HD Priority"  attr=impact lookup=no
           evt="onBlur=\\\"detailSyncEditForms(this)\\\"" make_required="yes">

<PDM_MACRO NAME=dtlStartRow>
<PDM_MACRO NAME=dtlTextbox      hdr="Insert Comment"  attr=z_desc_alg
           colspan=4 size=80 rows=6>
endDetail();

<PDM_IF "TR" == "$args.alg.type">
var prioElements = detailHideElements(prio_id, 2, assignee_id);
</PDM_IF>
disable();
</SCRIPT>
</PDM_FORM>
</CENTER>
<PDM_INCLUDE FILE=std_footer.htmpl>
</BODY>
</HTML>
<PDM_IF 0>
@(#)$Id: xfer_esc_cr.htmpl,v 1.47.1.6 2004/06/18 14:17:01 dusch01 Exp $
</PDM_IF>



As test , I tried to remove "impact" from the spl code:


//////////////////////////////////////////////////////////////////////////////////////////
// Input fields
// argv[0]: Fields number
// argv[1]: "assignee"            argv[2]: old value (db)        argv[3]: new value 
// argv[4]: "status"            argv[5]: old value (db)        argv[6]: new value 
// argv[7]: "priority"            argv[8]: old value (db)        argv[9]: new value 
// argv[10]: "impact"            argv[11]: old value (db)    argv[12]: new value 
//////////////////////////////////////////////////////////////////////////////////////////
cr::zz_cr_reset_assignee(...)
{


string pri;
pri = argv[9];

if (status == 'OP'){

send_wait(0, this, "call_attr", "assignee", "set_val", "", "SUPPRESS_TRIGGERS" );
send_wait(0, this, "call_attr", "set_val", pri, "SUPPRESS_TRIGGERS" );

......



I restarted the service, and created a new request. As expected the impact value was equal to "none".
and in this case, even if the request status was "open" I succeded in changing impact value with the "Change HD Priority" function.
Unfortunately I don't need a "none" impact value in new request,but the impact value must be equal
to the priority value chosen by the affected end user.

So I need a way to change the impact value by "Change HD Priority" function when the request is in a "open" status.

If anyone can help,I appeciate any advice.
Many thanks,
post-feed

Back to top
 

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System

This site is not affiliated with CA. All trademarks are © their respective owners. All other content is © HelpDeskUsers.com and 4uTechnologies, Inc.
4uTechnologies, Inc. reserves the right to content contained within this site.
{THEMEDISCLAIMER}