Details
Description
Summary
========
Provide users with a way to add pre-configured sets of scheduled activities to an existing case.
Implementation
============
1. New field in Case View form - "Add Timeline" (timeline_id). Select field uses same options as the report_id field ($reports array)
(I've add this field to form class and tpl already)
2. The button needs on onclick function that does the following:
- check than a non-null option is selected
- give Jscript confirm (the text for this is already in the tpl)
- redirect to the URL which will do the processing (see next section)
3. Processing rules
NOTE: Modify the existing function used by Open Case and Change Case Type to populate the "standard timeline" activity set - such that it can do this "variation"
- Insert an activity record for each activity in the selected activity set EXCEPT if it would violate the max_instances rule for that activity type
- Due dates are set using reference_offset days - added to now(), timestamp part is current time
- Status set to Scheduled for all inserted records
- Set is_auto = 1
After inserts, reload Case View form with status message : "$activitySet activities have been added to the schedule for this case."