equal
deleted
inserted
replaced
41 return not self.entity.primary_email |
41 return not self.entity.primary_email |
42 |
42 |
43 |
43 |
44 class SetPrimaryEmailHook(hook.Hook): |
44 class SetPrimaryEmailHook(hook.Hook): |
45 """notify when a bug or story or version has its state modified""" |
45 """notify when a bug or story or version has its state modified""" |
46 __id__ = 'setprimaryemail' |
46 __regid__ = 'setprimaryemail' |
47 __select__ = hook.Hook.__select__ & hook.match_rtype('use_email') |
47 __select__ = hook.Hook.__select__ & hook.match_rtype('use_email') |
48 category = 'email' |
48 category = 'email' |
49 events = ('after_add_relation',) |
49 events = ('after_add_relation',) |
50 |
50 |
51 def __call__(self): |
51 def __call__(self): |
54 SetPrimaryEmailRelationOp(self._cw, entity=entity, |
54 SetPrimaryEmailRelationOp(self._cw, entity=entity, |
55 email=self._cw.entity_from_eid(self.eidto)) |
55 email=self._cw.entity_from_eid(self.eidto)) |
56 |
56 |
57 class SetUseEmailHook(hook.Hook): |
57 class SetUseEmailHook(hook.Hook): |
58 """notify when a bug or story or version has its state modified""" |
58 """notify when a bug or story or version has its state modified""" |
59 __id__ = 'setprimaryemail' |
59 __regid__ = 'setprimaryemail' |
60 __select__ = hook.Hook.__select__ & hook.match_rtype('primary_email') |
60 __select__ = hook.Hook.__select__ & hook.match_rtype('primary_email') |
61 category = 'email' |
61 category = 'email' |
62 events = ('after_add_relation',) |
62 events = ('after_add_relation',) |
63 |
63 |
64 def __call__(self): |
64 def __call__(self): |