make short description change with variables
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-11-2017 07:12 AM
Hi All,
I have a question, I am trying to get the task short description change based on what is selected when the from is submitted.
On the form I have two variables: a reference variable named "Application" and a select box variable named "Request". I also have the short description variable on the form. Each of the variables have the following options when selected:
Application Request
Prod Change
Test Job Edit
Dev General Support
I need to have the variables be the following when selected : Prod = PD, Test = Test, Dev = DV, Change = CH, Job Edit = JE, and General Support = GS so that in turn the
the short description on the task be changed to the following:
RITMXXXX+application+request+whatever was entered on the short description:
In other words if on the form I choose Prod and Change and have the short description "making change" then the actual wording on the short description box on the task would be: RITMXXXPDCH making change.
I thought about doing a client catalog script with the following but I am lost on how to get the rest to work as I want too. Any ideas on what is the best way to accomplish this?
if (!current.variables.var_ci.nil()) {
task.cmdb_ci = current.variables.var_ci;
}
if (current.variables.Application == "Prod"){
}else if (current.variables.Application == "Test"){
}else if (current.variables.Application == "Dev"){
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2017 06:19 AM
Best way to implement this will be in the workflow where you are creating the task. In the Create task activity, you can write a script to access the variable on your request and update the description and short description on your task.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2017 07:12 AM
> and update the description and short description on your task.
Please correct me if I'm wrong, but "update" implies AFTER the record is in the database and AFTER the emails has been sent out and AFTER the confirmation page shows with the generic Catalog item short description.
I believe the OPs intent (as well as mine) is to have all this done immediately after pressing "Order Now" before the record is in the database, before the emails have been sent out, so that the short description shows the changed values.
In the example I posted, "Request a new Recurring Change Schedule for Monthly Patch and Reboot" is the short description on the Catalog Item. With the Business Rule set up on the sc_req_item table, I can ensure that the email goes out with the changed subject.
Both the sc_request and the sc_req_item show the new sexy updated short description.
And the email has the changed subject (because it's sent out based on the sc_req_item table)
HOWEVER, the APPROVAL still shows the unchanged subject.
The real problem is the Approval. I am under the impression that by changing the short description while filling out the form (Catalog Client Script), we would not need to change 3 tables with business rules.