Closed (fixed)
Project:
Content Moderation Notifications
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
12 Jun 2017 at 11:45 UTC
Updated:
5 Jul 2017 at 16:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
akozma commentedComment #3
akozma commentedI'm not sure how can I get the initial state value when the node is just created. Our call (hook_insert) is executed after the entity object is updated, so by using the "Save and Publish" option the status is TRUE and based on that the getInitialState returns "published".
The patch adds the condition "$entity->original == NULL" but the "$previous_state = 'draft';" is still hardcoded now.
Any ideas?
Comment #4
akozma commentedSmall fix on coding standards.
Comment #5
akozma commentedComment #6
rob holmes commentedThanks for this, our upgrade window is tomorrow so i should get a chance to look at this then.
Comment #8
rob holmes commented