1) add an 'email team' team to a new space
2) add a discussion section to a space with the default notification set to 'email team'
3) make the space a blueprint
4) clone the space
5) the cloned space has the email team and the discussion section, but the 'email team' is no longer set as the notification for the discussion section.

Should this be 'normal' behavior? If not, any tips to make this behavior automatic?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rjzaar created an issue. See original summary.

mpotter’s picture

Category: Bug report » Feature request

This is correct. Notifications are not cloned. Patches are welcome.

joelstein’s picture

Version: 7.x-2.62 » 7.x-2.x-dev
Component: Clone App » Notifications App
Status: Active » Needs review
FileSize
1.14 KB

Here's a patch which adds support for cloned notification overrides for Sections (but not Spaces). If you override the notifications setting for a Section (to use its own notifications instead of inheriting them from the Space), when that Section is cloned, both the override and notification settings will be pre-populated on the node clone form, and they are retained after the Section is cloned.

This also make sense conceptually for Sections. The eligible entities that could be referenced in the notification settings are Groups, Teams, and Members, and these live in the same Space for both the original and clone Sections.

However, for Spaces, it's a little more difficult, both conceptually and programmatically. Because, when a Space is cloned, it's Groups and Teams are also cloned (but not it's Members). So, if I clone a Space that has a default notification setting to notify a Team in that Space, the expected result of cloning that Space is that the notification setting points to the cloned Team. Further, if I have a Section in that Space which is overriding the default notification settings to notify a Group or a Team in that Space, the expected result of cloning the Space is that the cloned Section retains the overridden notification settings and that these now point to the overridden Group or Team. To pull this off, more discussion is needed, as well as a more comprehensive patch to map the cloned stuff to make it all work.

In summary, the attached patch adds support for Sections, but not Spaces.

mpotter’s picture

Status: Needs review » Needs work

I don't think this patch is the right way to do it. Anything related to cloning should be within the oa_clone module. This patch makes changes in oa_notifications module which should not have any knowledge of cloning.