Assign a catalog task without filling Mandatory variables
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2024 11:16 AM
I am trying to allow catalog tasks to be assigned to a user without the mandatory fields being required.
I have one field that needs to be filled in before the catalog task is closed. This is controlled by a Catalog UI Policy
I tried creating a new save button with a UI Action on the sc_task table using code from the below link, but it doesn't seem to work. Maybe it only works on an older version (Current build is Utah)
Any help would be appreciated
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2024 11:24 AM
I would create a UI action 'Assign to me' and make check mandatory false in that UI action. That way user will be able to assign to the ticket to them and later fill in that mandatory field.
g_form.checkMandatory = false;
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2024 11:35 AM
Isn't that basically what the linked solution is trying to do?
It checks whether the state is 3, which I assume is closed, and if it's not 3, then it sets checkmandatory to false, ignores the variables, and then submits. Is there something wrong with it that I'm missing?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2024 02:09 PM
Ohh...I see. So looks like the checkMandatory doesnt work for variables.
I think the solution provided in this thread should work for you to add script in the UI policy
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2024 03:51 PM
Hi @jyan3 ,
I think you should go with UI Policy here.
Like below-
Execute if true-
function onCondition() {
if(Your_condition) {
g_form.setMandatory('name_of_computer_on_loan', true);
}
}
Execute if false-
function onCondition() {
g_form.setMandatory('name_of_computer_on_loan', false);
}
If my response has resolved your query, please consider giving it a thumbs up ‌‌ and marking it as the correct answer‌‌!
Thanks & Regards,
Sanjay Kumar