UI Action acting differently on the Workspace, not changing state before closing the task
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2022 10:18 AM
I have a UI action to Close Task. It sets the current state to Closed Complete and Updates the ticket:
current.state = 3;
current.update();
I also have a UI policy that if the State is Closed Complete it makes additional fields mandatory. In native view this is working as expected, I click the Close Task button, the state changes to Closed Complete and then the mandatory fields are not filed out and it stops the submit.
In Workspace I think the Close Task button and the task just closes. The fields are not made mandatory per the UI Policy even though after its closed the state is Closed Complete. It is skipping over my UI policy for state is Closed Complete and closing the task anyway.
Is there a way I can force it to check the UI policy before close in the workspace view? Or a better way to ensure variables are made mandatory before submitting?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2022 11:55 AM - edited 12-07-2022 01:19 PM
Can you add a screenshot of your UI policy?
That will allow me to help you.
I recreated your case on my instance and it is working consistently between the platform and workspace views.
If I helped you with your case, please click the Thumb Icon and mark as Correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2022 09:54 AM
Here is the script in the UI Policy. The When to Apply is State = Closed Complete, but since I cannot access variables from the normal UI Policy I needed to set the script. It would be preferable to run in a Catalog UI Policy but I cannot access the form fields from there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2022 02:43 PM
Do you have global with a checkmark?
If I helped you with your case, please click the Thumb Icon and mark as Correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2022 02:56 PM
Have you tried doing this with a data policy? You can access the variables since that is server code.
If I helped you with your case, please click the Thumb Icon and mark as Correct.