How to update ctask once created
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2024 08:46 PM
Hi
How to update description of Change request - CTASKs after it created.
For ex: I have couple of CTASKs got created & need to update the description based on short_description.
Appreciate your inputs. Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2024 09:00 PM
@Km Sh You can create an onBefore Update business rule on your Change Task table with Advanced checkbox checked.
You can use the following script in the script field.
if (current.short_description.changes()) {
// Update the description with the new short description value
current.description = 'Updated Short Description: ' + current.short_description;
}
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2024 11:32 PM
actually I need to update all the CTASK descriptions, if it matches to short description i.e.; MACD Devices:
for ex: Ctask1, Ctask2, Ctask3...
Is this correct or missing something..

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2024 02:57 AM
@Km Sh You can try to use the following script in a business rule if you wish to update the description of all change tasks associated with the change request.
var changeTaskGR = new GlideRecord('change_task');
changeTaskGR.addQuery('change_request', current.change_request); // Match the parent Change Request
changeTaskGR.query();
// Loop through each Change Task and update the description
while (changeTaskGR.next()) {
var text1 = "MACD Devices: xyz hello";
var str = changeTaskGR.getValue('short_description');
if (str.indexOf(text1) > -1) {
changeTaskGR.description ='Updated description';//Add updated description here
changeTaskGR.update();
gs.info('Updated Change Task: ' + changeTaskGR.number);
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2024 09:09 PM
Karimullah,
"Out of the box" it's possible to update the description on both normal change requests and change tasks at any stage. If you are referring to a Normal type change request where you are unable to modify the description then you will have to reference your companies own customizations.
If this is a Standard type change then out of the box the description field on change request (and short description on change tasks) are disallowed from editing. The assumption is that it's a standardized change so those fields (and more) should always be the same. You can adjust which fields are mandatory, read only, and more in the 'Standard Change Properties' module.