symbiote / silverstripe-advancedworkflow

A highly configurable step-based workflow module.
BSD 3-Clause "New" or "Revised" License
47 stars 71 forks source link

Workflow PublishItemWorkflowAction uses PublishSingle #378

Closed jules0x closed 6 years ago

jules0x commented 6 years ago

The execute function in PublishItemWorkflowAction.php uses publishSingle() instead of publishRecursive() which means $owns relationships are not published. This was noticed specifically on Elemental as edits to components should be published when the owning page is published. https://github.com/jules0x/silverstripe-advancedworkflow/commit/756e7cbe0684ac427e50765f4423ed15f19301c3

robbieaverill commented 6 years ago

Hi @jules0x, I've had a look through the history of this file and my guess would be that at the time, to recommended replacement for doPublish() was publishSingle(). I'd be happy for you to make a PR to change it to publishRecursive() (which is now the recommended replacement for doPublish()).

Would you like to make a PR?

jules0x commented 6 years ago

Sure, I'll do that some time ~today~ this weekend.

robbieaverill commented 6 years ago

Thanks, please make the PR against the 5.0 branch (I'll merge it up afterwards)

jules0x commented 6 years ago

🤔 I created this branch off master so my PR has 27 commits in it, though I only made the one. Should I have branched off 5.0 to make the adjustment instead?

ScopeyNZ commented 6 years ago

Yeah. You can just perform a git rebase origin/5.0 and force-push your branch to fix this. I can do this if you want?

robbieaverill commented 6 years ago

I've rebased the PR