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
Carlos Ramos Carreño
slapos.core
Commits
3b74c599
Commit
3b74c599
authored
Sep 13, 2024
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_crm: alarm to reopen suspended support request with new event
Reopen the support request when a new event is created
parent
7e3e19f5
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
410 additions
and
1 deletion
+410
-1
master/bt5/slapos_crm/PathTemplateItem/portal_alarms/slapos_crm_check_suspended_support_request_to_reopen.xml
.../slapos_crm_check_suspended_support_request_to_reopen.xml
+113
-0
master/bt5/slapos_crm/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
...rtalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
+4
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Alarm_checkSuspendedSupportRequestToReopen.py
..._monitoring/Alarm_checkSuspendedSupportRequestToReopen.py
+12
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Alarm_checkSuspendedSupportRequestToReopen.xml
...monitoring/Alarm_checkSuspendedSupportRequestToReopen.xml
+62
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequest_checkSuspendedToReopen.py
...s_crm_monitoring/SupportRequest_checkSuspendedToReopen.py
+12
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequest_checkSuspendedToReopen.xml
..._crm_monitoring/SupportRequest_checkSuspendedToReopen.xml
+62
-0
master/bt5/slapos_crm/WorkflowTemplateItem/portal_workflow/slapos_crm_interaction_workflow/interaction_Event_setFollowUp.xml
...rm_interaction_workflow/interaction_Event_setFollowUp.xml
+60
-0
master/bt5/slapos_crm/WorkflowTemplateItem/portal_workflow/slapos_crm_interaction_workflow/script_Base_triggerCheckSuspendedSupportRequestToReopen.py
...cript_Base_triggerCheckSuspendedSupportRequestToReopen.py
+4
-0
master/bt5/slapos_crm/WorkflowTemplateItem/portal_workflow/slapos_crm_interaction_workflow/script_Base_triggerCheckSuspendedSupportRequestToReopen.xml
...ript_Base_triggerCheckSuspendedSupportRequestToReopen.xml
+78
-0
master/bt5/slapos_crm/bt/template_portal_type_workflow_chain_list
...t5/slapos_crm/bt/template_portal_type_workflow_chain_list
+2
-1
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSCodingStyle.py
...Item/portal_components/test.erp5.testSlapOSCodingStyle.py
+1
-0
No files found.
master/bt5/slapos_crm/PathTemplateItem/portal_alarms/slapos_crm_check_suspended_support_request_to_reopen.xml
0 → 100644
View file @
3b74c599
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Alarm"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
active_sense_method_id
</string>
</key>
<value>
<string>
Alarm_checkSuspendedSupportRequestToReopen
</string>
</value>
</item>
<item>
<key>
<string>
automatic_solve
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Check if a public or a friend compute_node contacted master recently and create a ticket if the compute_node stops to contact master after some time.
</string>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
slapos_crm_check_suspended_support_request_to_reopen
</string>
</value>
</item>
<item>
<key>
<string>
periodicity_hour
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_hour_frequency
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
periodicity_minute
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_minute_frequency
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
periodicity_month
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_month_day
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_month_frequency
</string>
</key>
<value>
<int>
12
</int>
</value>
</item>
<item>
<key>
<string>
periodicity_start_date
</string>
</key>
<value>
<object>
<klass>
<global
name=
"_reconstructor"
module=
"copy_reg"
/>
</klass>
<tuple>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</tuple>
<state>
<tuple>
<float>
1288051200.0
</float>
<string>
GMT
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
periodicity_week
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Alarm
</string>
</value>
</item>
<item>
<key>
<string>
sense_method_id
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Check suspended support request to reopen
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
View file @
3b74c599
...
@@ -23,4 +23,8 @@
...
@@ -23,4 +23,8 @@
<type>
Sale Invoice Transaction Line
</type>
<type>
Sale Invoice Transaction Line
</type>
<workflow>
slapos_crm_interaction_workflow
</workflow>
<workflow>
slapos_crm_interaction_workflow
</workflow>
</chain>
</chain>
<chain>
<type>
Web Message
</type>
<workflow>
slapos_crm_interaction_workflow
</workflow>
</chain>
</workflow_chain>
</workflow_chain>
\ No newline at end of file
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Alarm_checkSuspendedSupportRequestToReopen.py
0 → 100644
View file @
3b74c599
portal
=
context
.
getPortalObject
()
activate_kw
=
{
'tag'
:
tag
}
portal
.
portal_catalog
.
searchAndActivate
(
portal_type
=
'Support Request'
,
simulation_state
=
'suspended'
,
method_id
=
'SupportRequest_checkSuspendedToReopen'
,
method_kw
=
{
'activate_kw'
:
activate_kw
},
activate_kw
=
activate_kw
)
context
.
activate
(
after_tag
=
tag
).
getId
()
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Alarm_checkSuspendedSupportRequestToReopen.xml
0 → 100644
View file @
3b74c599
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"_reconstructor"
module=
"copy_reg"
/>
</klass>
<tuple>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</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>
tag, fixit, params
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Alarm_checkSuspendedSupportRequestToReopen
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequest_checkSuspendedToReopen.py
0 → 100644
View file @
3b74c599
from
Products.ZSQLCatalog.SQLCatalog
import
SimpleQuery
portal
=
context
.
getPortalObject
()
support_request
=
context
any_recent_event
=
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
portal
.
getPortalEventTypeList
(),
follow_up__uid
=
support_request
.
getUid
(),
creation_date
=
SimpleQuery
(
creation_date
=
support_request
.
getModificationDate
(),
comparison_operator
=
'>'
)
)
if
any_recent_event
is
not
None
:
support_request
.
validate
(
comment
=
'Reopened because %s is newer'
%
any_recent_event
.
getRelativeUrl
())
support_request
.
reindexObject
(
activate_kw
=
activate_kw
)
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequest_checkSuspendedToReopen.xml
0 → 100644
View file @
3b74c599
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"_reconstructor"
module=
"copy_reg"
/>
</klass>
<tuple>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</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>
activate_kw=None
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SupportRequest_checkSuspendedToReopen
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/WorkflowTemplateItem/portal_workflow/slapos_crm_interaction_workflow/interaction_Event_setFollowUp.xml
0 → 100644
View file @
3b74c599
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Interaction Workflow Interaction"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
after_script/portal_workflow/slapos_crm_interaction_workflow/script_Base_triggerCheckSuspendedSupportRequestToReopen
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
interaction_Event_setFollowUp
</string>
</value>
</item>
<item>
<key>
<string>
portal_type_filter
</string>
</key>
<value>
<tuple>
<string>
Web Message
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
temporary_document_disallowed
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
trigger_method_id
</string>
</key>
<value>
<tuple>
<string>
_setFollowUp.*
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
trigger_once_per_transaction
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/WorkflowTemplateItem/portal_workflow/slapos_crm_interaction_workflow/script_Base_triggerCheckSuspendedSupportRequestToReopen.py
0 → 100644
View file @
3b74c599
event
=
state_change
[
'object'
]
support_request
=
event
.
getFollowUpValue
()
if
(
support_request
is
not
None
)
and
(
support_request
.
getSimulationState
()
==
'suspended'
):
return
state_change
[
'object'
].
Base_reindexAndSenseAlarm
([
'slapos_crm_check_suspended_support_request_to_reopen'
])
master/bt5/slapos_crm/WorkflowTemplateItem/portal_workflow/slapos_crm_interaction_workflow/script_Base_triggerCheckSuspendedSupportRequestToReopen.xml
0 → 100644
View file @
3b74c599
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Workflow Script"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"_reconstructor"
module=
"copy_reg"
/>
</klass>
<tuple>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</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>
state_change
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
script_Base_triggerCheckSuspendedSupportRequestToReopen
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Workflow Script
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/bt/template_portal_type_workflow_chain_list
View file @
3b74c599
...
@@ -8,4 +8,5 @@ Regularisation Request | slapos_crm_interaction_workflow
...
@@ -8,4 +8,5 @@ Regularisation Request | slapos_crm_interaction_workflow
Regularisation Request | ticket_interaction_workflow
Regularisation Request | ticket_interaction_workflow
Regularisation Request | ticket_workflow
Regularisation Request | ticket_workflow
Sale Invoice Transaction Line | slapos_crm_interaction_workflow
Sale Invoice Transaction Line | slapos_crm_interaction_workflow
Sale Invoice Transaction | slapos_crm_interaction_workflow
Sale Invoice Transaction | slapos_crm_interaction_workflow
\ No newline at end of file
Web Message | slapos_crm_interaction_workflow
\ No newline at end of file
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSCodingStyle.py
View file @
3b74c599
...
@@ -116,6 +116,7 @@ def makeTestSlapOSCodingStyleTestCase(tested_business_template):
...
@@ -116,6 +116,7 @@ def makeTestSlapOSCodingStyleTestCase(tested_business_template):
'slapos_crm_monitoring/SupportRequestModule_exportMonitoringOPMLDescriptionList'
,
'slapos_crm_monitoring/SupportRequestModule_exportMonitoringOPMLDescriptionList'
,
'slapos_crm_monitoring/SupportRequestModule_getInstanceMessageList'
,
'slapos_crm_monitoring/SupportRequestModule_getInstanceMessageList'
,
'slapos_crm_monitoring/SupportRequestModule_getMonitoringOPMLDescriptionList'
,
'slapos_crm_monitoring/SupportRequestModule_getMonitoringOPMLDescriptionList'
,
'slapos_crm_monitoring/SupportRequest_checkSuspendedToReopen'
,
'slapos_crm_monitoring/SupportRequest_getInstanceMessageList'
,
'slapos_crm_monitoring/SupportRequest_getInstanceMessageList'
,
'slapos_crm_monitoring/SupportRequest_getInstanceMonitorUrl'
,
'slapos_crm_monitoring/SupportRequest_getInstanceMonitorUrl'
,
'slapos_crm_monitoring/SupportRequest_getMonitorUrl'
,
'slapos_crm_monitoring/SupportRequest_getMonitorUrl'
,
...
...
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