work note do not display variables values.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2024 09:11 AM
I am writing run script to display work notes which hold variables value if stage is planning in release management.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2024 05:07 AM
var x = applications + '|' + business_application_bai + '|' + name + '|' + names;
if (current.work_notes) {
current.work_notes += '\n' + x; //add to existing data
} else {
current.work_notes = x;
}
current.update();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2024 05:27 AM
What are the field types of the applications and business_application_bai? As it might need to be stringified also, or fetched with the getDisplayValue('field'). Right now you are directly assigning the field object, which does not automatically convert into a (string) value or something, so will not work when constructing string x.
Also, you dont have to append string x to current.work_notes. Just doing current.work_notes = x and then a update will work fine and sort it out for you, and just adds it as a new work note.
var applications = current.getDisplayValue('applications');
var business_application_bai = current.getDisplayValue('business_application_bai');
var name = current.name.toString();
var names = current.names.toString();
var version = current.application_version.toString();
var x =
applications +
'\n' +
business_application_bai +
'\n' +
name +
'\n' +
names;
current.work_notes = x;
current.update();