sc_task work note is mandatory on closed state
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2015 02:24 PM
Hi all - I have been looking through the wiki to find some help with this.
I have sc_tasks that I want to make work note mandatory when state changes to "closed complete" or "closed incomplete".
I created a ui_policy called "Make work note mandatory on close state". But when I clicked on the "Close Task" button, the ui_policy didn't work.
Do I need to create a business rule or ui action around the "Close task" button. If so, can someone give me some direction on how to do so?
Thanks much!
Hank

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2015 11:44 PM
Hi Hank,
It is possible via UI Policy,
You just need to give proper Condition.
Just Make New UI policy in which Give Condition as Follow:-
state is one of Closed complete, closed, etc (as per ur choice).
Then Go down And select field name as work Notes it will 100 percent work.
Sean has shown you the Screen shot also.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2015 11:48 PM
Hi Hank,
See I have one Simple solution for this, as per my understanding you want to update worknotes rite.
So do one thing Just Create UI policy in which write condition as:
State is not closed.
and make worknotes mandatory. so before state gets closed it will populate a message saying that work note is mandatory.
this is what we have done in our instance.
see image below( just in this we have made comments mandatory.) simply u can change it to work notes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2015 04:23 PM
This is one other example:
By editing the default CLOSE TASK UI action with this example code I was able to make Additional Comments(request_item.comments dot walked) field required upon submission of Task.
/sys_ui_action.do?sys_id=79cc847bc611227d01a8092813683b36
Name: Close Task
Table: sc_task
action name: close_task
client: checked
onclick: closeTheTask();
Script:
function closeTheTask(){
try {g_form.hideFieldMsg('request_item.comments');} catch(e) {}
g_form.setMandatory('request_item.comments', true);
gsftSubmit(null, g_form.getFormElement(), 'close_task');
}
if (typeof window == 'undefined')
defCloseTask();
function defCloseTask(){
current.state = 3;
current.update();
}