Set catalog task due date to empty from workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2023 09:41 AM
I have a catalog item on the sc_req_item table that only has a catalog task workflow activity. I want to generate the task with an empty due date. No matter what I try, it is currently setting the due date to the current time.
Here's what I've tried so far:
1. Setting the schedule on the catalog task activity to 0 days 0 hours 0 minutes 0 seconds
2. Setting the schedule via script where answer = null;
3. Setting the task.due_date = ''; in the advanced script on the catalog task activity
4. Setting the task.due_date = null; in the advanced script on the catalog task activity
5. Changing the CatalogTaskGeneration script includes to not set the due date from the parent RITM
6. Creating a before/insert business rule on sc_task with the following line: current.due_date = null;
7. Creating an after/insert business rule on sc_task with the following line: current.due_date = null;
Any ideas? I am able to successfully set the due date to a future date using these methods, but no matter what I try to get the field to be empty, something is populating the current date/time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2023 09:46 AM
Hi @Oliver Anderson ,
Can u check the dictionary of that field. If under default value some script is written.
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2023 09:48 AM
No, there is no default value for due_date
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2023 09:56 AM
Hi @Oliver Anderson ,
Here are some more steps😬
it's possible that there might be another business rule, workflow, or script that is overriding your changes. Here are a few additional suggestions to troubleshoot and resolve the issue:
1. **Check for Workflow Activities or Business Rules in Parent Records:**
- Review any parent records (like the Requested Item) that might have associated workflows or business rules affecting the due date. Make sure there aren't any workflows or business rules in the parent records that are overriding the due date value set in the catalog task.
2. **Inspect Field Dependencies:**
- Ensure that the `due_date` field on the `sc_task` table doesn't have any field dependencies or calculated values that could be populating the field with the current date/time.
3. **Explore Catalog Task Generation Settings:**
- Check the catalog task generation settings within your catalog item. There might be specific configurations related to due dates that are causing the behavior. Ensure that the catalog task generation settings align with your requirements.
4. **Debug Catalog Task Generation Scripts:**
- If your catalog item uses a script to generate catalog tasks, debug that script. Add log statements to trace the flow of execution and check if any other script or process is modifying the `due_date` field after your changes.
5. **Review Workflow Context:**
- If your catalog task is generated through a workflow, review the context within the workflow. Ensure that no script activities or other workflow activities are setting the `due_date` field.
6. **Check Related Lists and UI Policies:**
- Review related lists and UI policies associated with `sc_task`. Sometimes, UI policies can enforce certain field values. Make sure there are no UI policies or related lists that are interfering with the `due_date` field.
By carefully inspecting these areas, you should be able to identify the source of the issue and adjust the configurations/scripts accordingly to ensure the `due_date` field is empty as intended.
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2023 11:08 AM
After reviewing these, the only section im questioning are Business Rules on sc_req_item. There is a BR called "Create Request Item Child" that seems to generate tasks using the "CatalogTaskGenerator" script. It does include a line that sets due date, but after doing some testing it still seems like the schedule on the workflow activity is setting the due date.
Is there any way to show logs of what scripts/rules/etc. are actually running when a specific field is populated? I've tried debugging Business Rules and submitting a request, but I don't see anything regarding the BR mentioned above or anything regarding due_date.