Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Roque
slapos.core
Commits
da9d79b2
Commit
da9d79b2
authored
Aug 23, 2022
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_crm: Ensure Event Source and Destination is consistent
parent
11119d2d
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
401 additions
and
2 deletions
+401
-2
master/bt5/slapos_crm/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
...rtalTypePropertySheetTemplateItem/property_sheet_list.xml
+9
-0
master/bt5/slapos_crm/PropertySheetTemplateItem/portal_property_sheets/EventSlapOSConstraint.xml
...lateItem/portal_property_sheets/EventSlapOSConstraint.xml
+66
-0
master/bt5/slapos_crm/PropertySheetTemplateItem/portal_property_sheets/EventSlapOSConstraint/customer_causality_related_constraint_constraint.xml
...aint/customer_causality_related_constraint_constraint.xml
+80
-0
master/bt5/slapos_crm/PropertySheetTemplateItem/portal_property_sheets/EventSlapOSConstraint/customer_source_destination_consistency_constraint.xml
...nt/customer_source_destination_consistency_constraint.xml
+80
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Event_checkCausalityRelatedConsistency.py
..._crm_monitoring/Event_checkCausalityRelatedConsistency.py
+20
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Event_checkCausalityRelatedConsistency.xml
...crm_monitoring/Event_checkCausalityRelatedConsistency.xml
+62
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Event_checkCustomerAsSourceOrDestinationConsistency.py
...ng/Event_checkCustomerAsSourceOrDestinationConsistency.py
+16
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Event_checkCustomerAsSourceOrDestinationConsistency.xml
...g/Event_checkCustomerAsSourceOrDestinationConsistency.xml
+62
-0
master/bt5/slapos_crm/bt/template_portal_type_property_sheet_list
...t5/slapos_crm/bt/template_portal_type_property_sheet_list
+4
-1
master/bt5/slapos_crm/bt/template_property_sheet_id_list
master/bt5/slapos_crm/bt/template_property_sheet_id_list
+2
-1
No files found.
master/bt5/slapos_crm/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
View file @
da9d79b2
<property_sheet_list>
<portal_type
id=
"Mail Message"
>
<item>
EventSlapOSConstraint
</item>
</portal_type>
<portal_type
id=
"Regularisation Request"
>
<item>
Codification
</item>
</portal_type>
<portal_type
id=
"Site Message"
>
<item>
EventSlapOSConstraint
</item>
</portal_type>
<portal_type
id=
"Web Message"
>
<item>
EventSlapOSConstraint
</item>
</portal_type>
</property_sheet_list>
\ No newline at end of file
master/bt5/slapos_crm/PropertySheetTemplateItem/portal_property_sheets/EventSlapOSConstraint.xml
0 → 100644
View file @
da9d79b2
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Property Sheet"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_count
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_mt_index
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_tree
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
EventSlapOSConstraint
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Property Sheet
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Length"
module=
"BTrees.Length"
/>
</pickle>
<pickle>
<int>
0
</int>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/PropertySheetTemplateItem/portal_property_sheets/EventSlapOSConstraint/customer_causality_related_constraint_constraint.xml
0 → 100644
View file @
da9d79b2
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Script Constraint"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_identity_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_range_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
constraint_type/default
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
customer_causality_related_constraint_constraint
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Script Constraint
</string>
</value>
</item>
<item>
<key>
<string>
script_id
</string>
</key>
<value>
<string>
Event_checkCausalityRelatedConsistency
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/PropertySheetTemplateItem/portal_property_sheets/EventSlapOSConstraint/customer_source_destination_consistency_constraint.xml
0 → 100644
View file @
da9d79b2
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Script Constraint"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_identity_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_range_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
constraint_type/default
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
customer_source_destination_consistency_constraint
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Script Constraint
</string>
</value>
</item>
<item>
<key>
<string>
script_id
</string>
</key>
<value>
<string>
Event_checkCustomerAsSourceOrDestinationConsistency
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Event_checkCausalityRelatedConsistency.py
0 → 100644
View file @
da9d79b2
support_request
=
context
.
getCausalityRelatedValue
(
portal_type
=
"Support Request"
)
error_list
=
[]
if
support_request
:
if
context
.
getSource
()
!=
support_request
.
getDestinationDecision
():
error_list
.
append
(
'Sender should be the customer'
)
if
fixit
:
context
.
edit
(
source
=
support_request
.
getDestinationDecision
())
assert
context
.
getSource
()
==
support_request
.
getDestinationDecision
()
if
context
.
getDestination
()
!=
support_request
.
getSourceSection
():
error_list
.
append
(
'Destination should be the slapos organisation'
)
if
fixit
:
context
.
edit
(
destination
=
support_request
.
getSourceSection
())
assert
context
.
getDestination
()
==
support_request
.
getSourceSection
()
return
error_list
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Event_checkCausalityRelatedConsistency.xml
0 → 100644
View file @
da9d79b2
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
fixit=False
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Event_checkCausalityRelatedConsistency
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Event_checkCustomerAsSourceOrDestinationConsistency.py
0 → 100644
View file @
da9d79b2
support_request
=
context
.
getFollowUpValue
(
portal_type
=
"Support Request"
)
error_list
=
[]
if
support_request
:
customer
=
support_request
.
getDestinationDecision
()
if
context
.
getSource
()
!=
customer
and
\
customer
not
in
context
.
getDestinationList
()
:
error_list
.
append
(
'Customer should be source or destination of the event'
)
if
fixit
:
destination_list
=
context
.
getDestinationList
()
destination_list
.
append
(
customer
)
context
.
edit
(
destination
=
customer
)
assert
customer
in
context
.
getDestinationList
()
return
error_list
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Event_checkCustomerAsSourceOrDestinationConsistency.xml
0 → 100644
View file @
da9d79b2
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
fixit=False
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Event_checkCustomerAsSourceOrDestinationConsistency
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/bt/template_portal_type_property_sheet_list
View file @
da9d79b2
Regularisation Request | Codification
\ No newline at end of file
Mail Message | EventSlapOSConstraint
Regularisation Request | Codification
Site Message | EventSlapOSConstraint
Web Message | EventSlapOSConstraint
\ No newline at end of file
master/bt5/slapos_crm/bt/template_property_sheet_id_list
View file @
da9d79b2
SlapOSCRMSystemPreference
\ No newline at end of file
SlapOSCRMSystemPreference
EventSlapOSConstraint
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment