
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 Article Create Service so that an associated discussion thread will only be created by the Article Create Service IF the article is being submitted for publishing now.
Note: If the viewing user does not have permission to submit articles without approval, both the article and associated thread will be sent to the moderation queue, however, you only need to approve the article 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 Article 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 Article Create Service (currently one is, but not anymore).
The creation of the associated discussion thread for Draft Articles and Articles 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 Article or Article Awaiting Publishing OR CRON processes Articles scheduled for publishing.
Note: This is a change that I am making in ALL of my addons.
Upvote
0