The Daily Plan Service plans/submits orders a number of days ahead, by default 7 days, starting from the next day. The inventory function to update the Daily Plan “now” covers the current day and the next 7 days, see JOC-1750. This means both functions use the same scope for future days.
Example
If the Daily Plan Service starts at 00:00:00 of 24th then this is the begin of day of 24th and the Daily Plan Service will not plan/submit any orders for the current day but starting from 25th only. This means for a 7 days planning period (see Settings -> Daily Plan) that all days until and including 31st will be covered.
If the Daily Plan Service does not start at 00:00:00 but for example at 11:30 and the user updates the inventory at 11:00 then the update affects the remainder of the current Daily Plan period which is 30 min. and the next 7 days. This means that for the 7th day yesterday’s Daily Plan Service run had not created orders which is why we now find a single order for the 7th day from the inventory update which in turn prevents the Daily Plan Service run at 11:30 to add orders to the 7th day
Desired Behavior
The inventory function to update the Daily Plan generates only Orders for days on which a submission already exists.
This behavior avoids confusion with the Daily Plan Service, which skips days on which submissions exist.
This implies that the functionality to deploy/release workflows, schedules and calendars should consider the start time of the Daily Plan Service.
If the start time for the Daily Plan Service is after the current time in the same Daily Plan period, the 7th day is not taken into account, as no submission has yet been created by the Daily Plan Service.
If a day's submissions have been manually deleted within the next 7 days, no order will be created by the inventory function to update the Daily Plan on that day so that the Daily Plan Service can take over as expected.