Agreed, it's long past time for a change on when an associated discussion thread gets created!
Publishing options
Submit for publishing now
I've updated the Item Create Service so that an associated discussion thread will only be created by the Item Create Service IF the Item is being submitted for publishing now.
Note: If the viewing user does not have permission to submit items without approval, both the item and associated thread will be sent to the moderation queue, however, you only need to approve the item as the approval queue handler also handles approving the associated discussion thread.
Save as draft & Schedule for publishing on a set date/time
When creating an Item and the viewing user chooses the Publishing option "Save as draft" or "Scheduled for publishing on a set date/time", an associated discussion thread will no longer be created by the Item Create Service (currently one is, but not anymore).
The creation of the associated discussion thread for Draft Items and Items Awaiting Publishing has been moved into the Publish Draft Service.
I've updated the Publish Draft service to now process the creation of an associated discussion thread via the onPublishDraft() function, which is triggered when the viewing user clicks on the [Publish now] button when viewing a Draft Item or Item Awaiting Publishing OR CRON processes Items scheduled for publishing.
Note: This is a change that I am making in ALL of my addons that have Save as Draft and Scheduled Publishing.
Upvote
0