stories
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2023 10:28 PM
As a platform owner, I want to be to able to create story from an enhancement record AND
when
story is created,
if story state -> draft, enhancement state -> scoping
story state -> ready, enhancement state - > work in progress
story state -> cancelled, enhancement state - > cancelled
story state -> complete, enhancement state - > complete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2023 11:11 PM
Hi @pragadeesh254 ,
You can create a BR in order to achieve this requirement.
(function executeRule(current, previous) {
// Check if story state is changed to draft
if (current.state == 'draft') {
// Update corresponding enhancement record state to scoping
updateEnhancementRecord(current.enhancement_field, 'scoping');
}
// Add similar conditions for other states
})(current, previous);
// Function to update enhancement record
function updateEnhancementRecord(enhancementID, newState) {
var enhancementGR = new GlideRecord('Enhancement');
if (enhancementGR.get(enhancementID)) {
enhancementGR.state = newState;
enhancementGR.update();
}
}
Similarly u can have different conditions involved for all diff states.
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2023 11:13 PM
But in stories there is no state called enhancement state
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2023 11:14 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2023 11:25 PM