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
2a273d72
Commit
2a273d72
authored
Sep 13, 2022
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Plain Diff
Send Mail on pending tickets
See merge request
!417
parents
0468138d
97ec74c4
Changes
24
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
3999 additions
and
25 deletions
+3999
-25
master/bt5/slapos_crm/ActionTemplateItem/portal_types/Person/slapos_user_pending_ticket_report.xml
...portal_types/Person/slapos_user_pending_ticket_report.xml
+81
-0
master/bt5/slapos_crm/PathTemplateItem/portal_alarms/slapos_crm_send_pending_ticket_reminder.xml
...portal_alarms/slapos_crm_send_pending_ticket_reminder.xml
+119
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Alarm_sendPendingTicketReminder.py
.../slapos_crm_monitoring/Alarm_sendPendingTicketReminder.py
+9
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Alarm_sendPendingTicketReminder.xml
...slapos_crm_monitoring/Alarm_sendPendingTicketReminder.xml
+62
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Person_getSlapOSPendingTicket.py
...ns/slapos_crm_monitoring/Person_getSlapOSPendingTicket.py
+19
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Person_getSlapOSPendingTicket.xml
...s/slapos_crm_monitoring/Person_getSlapOSPendingTicket.xml
+62
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Person_getSlapOSPendingTicketMessageTemplate.py
...onitoring/Person_getSlapOSPendingTicketMessageTemplate.py
+17
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Person_getSlapOSPendingTicketMessageTemplate.xml
...nitoring/Person_getSlapOSPendingTicketMessageTemplate.xml
+62
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Person_sendPendingTicketReminder.py
...slapos_crm_monitoring/Person_sendPendingTicketReminder.py
+8
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Person_sendPendingTicketReminder.xml
...lapos_crm_monitoring/Person_sendPendingTicketReminder.xml
+62
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Person_sendSlapOSPendingTicketNotification.py
..._monitoring/Person_sendSlapOSPendingTicketNotification.py
+27
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Person_sendSlapOSPendingTicketNotification.xml
...monitoring/Person_sendSlapOSPendingTicketNotification.xml
+62
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Person_viewSlapOSPendingTicketDialog.xml
...s_crm_monitoring/Person_viewSlapOSPendingTicketDialog.xml
+163
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Person_viewSlapOSPendingTicketDialog/listbox.xml
...nitoring/Person_viewSlapOSPendingTicketDialog/listbox.xml
+229
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Person_viewSlapOSPendingTicketDialog/listbox_delivery_start_date.xml
...SlapOSPendingTicketDialog/listbox_delivery_start_date.xml
+2386
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Person_viewSlapOSPendingTicketDialog/my_title.xml
...itoring/Person_viewSlapOSPendingTicketDialog/my_title.xml
+96
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Person_viewSlapOSPendingTicketDialog/your_response_event_text_content.xml
...SPendingTicketDialog/your_response_event_text_content.xml
+133
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Person_viewSlapOSPendingTicketDialog/your_response_event_title.xml
...ewSlapOSPendingTicketDialog/your_response_event_title.xml
+124
-0
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMAlarm.py
...ateItem/portal_components/test.erp5.testSlapOSCRMAlarm.py
+9
-0
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMAlarm.xml
...teItem/portal_components/test.erp5.testSlapOSCRMAlarm.xml
+3
-24
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMSkins.py
...ateItem/portal_components/test.erp5.testSlapOSCRMSkins.py
+226
-1
master/bt5/slapos_crm/bt/template_action_path_list
master/bt5/slapos_crm/bt/template_action_path_list
+1
-0
master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/ERP5Site_initSlapOSUITest.py
.../portal_skins/slapos_ui_test/ERP5Site_initSlapOSUITest.py
+38
-0
master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/ERP5Site_initSlapOSUITest.xml
...portal_skins/slapos_ui_test/ERP5Site_initSlapOSUITest.xml
+1
-0
No files found.
master/bt5/slapos_crm/ActionTemplateItem/portal_types/Person/slapos_user_pending_ticket_report.xml
0 → 100644
View file @
2a273d72
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ActionInformation"
module=
"Products.CMFCore.ActionInformation"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
action_type/object_jio_action
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
category
</string>
</key>
<value>
<string>
object_jio_action
</string>
</value>
</item>
<item>
<key>
<string>
condition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
icon
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
slapos_user_pending_ticket_report
</string>
</value>
</item>
<item>
<key>
<string>
permissions
</string>
</key>
<value>
<tuple>
<string>
View
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
priority
</string>
</key>
<value>
<float>
50.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Send Pending Ticket Report
</string>
</value>
</item>
<item>
<key>
<string>
visible
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string>
string:${object_url}/Person_viewSlapOSPendingTicketDialog
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/PathTemplateItem/portal_alarms/slapos_crm_send_pending_ticket_reminder.xml
0 → 100644
View file @
2a273d72
<?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_sendPendingTicketReminder
</string>
</value>
</item>
<item>
<key>
<string>
automatic_solve
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Send a Mail Message with a Reminder in case the user has Tickets to respond
</string>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
slapos_crm_send_pending_ticket_reminder
</string>
</value>
</item>
<item>
<key>
<string>
periodicity_hour
</string>
</key>
<value>
<tuple>
<int>
6
</int>
</tuple>
</value>
</item>
<item>
<key>
<string>
periodicity_hour_frequency
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
periodicity_minute
</string>
</key>
<value>
<tuple>
<int>
0
</int>
</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_start_date
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<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>
periodicity_week_day
</string>
</key>
<value>
<tuple>
<string>
Tuesday
</string>
</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 compute_node\'s state
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Alarm_sendPendingTicketReminder.py
0 → 100644
View file @
2a273d72
portal
=
context
.
getPortalObject
()
portal
.
portal_catalog
.
searchAndActivate
(
portal_type
=
'Person'
,
method_id
=
'Person_sendPendingTicketReminder'
,
activate_kw
=
{
'tag'
:
tag
}
)
context
.
activate
(
after_tag
=
tag
).
getId
()
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Alarm_sendPendingTicketReminder.xml
0 → 100644
View file @
2a273d72
<?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>
tag, fixit, params
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Alarm_sendPendingTicketReminder
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Person_getSlapOSPendingTicket.py
0 → 100644
View file @
2a273d72
from
Products.ZSQLCatalog.SQLCatalog
import
ComplexQuery
,
SimpleQuery
portal
=
context
.
getPortalObject
()
person_uid
=
context
.
getUid
()
query
=
ComplexQuery
(
ComplexQuery
(
SimpleQuery
(
portal_type
=
[
"Support Request"
,
"Regularisation Request"
]),
SimpleQuery
(
simulation_state
=
"suspended"
),
SimpleQuery
(
destination_decision_uid
=
person_uid
),
logical_operator
=
'and'
),
ComplexQuery
(
SimpleQuery
(
portal_type
=
"Upgrade Decision"
),
SimpleQuery
(
simulation_state
=
"confirmed"
),
SimpleQuery
(
destination_decision_uid
=
person_uid
),
logical_operator
=
'and'
),
logical_operator
=
'or'
)
return
portal
.
portal_catalog
(
query
=
query
,
**
kw
)
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Person_getSlapOSPendingTicket.xml
0 → 100644
View file @
2a273d72
<?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>
**kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Person_getSlapOSPendingTicket
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Person_getSlapOSPendingTicketMessageTemplate.py
0 → 100644
View file @
2a273d72
portal
=
context
.
getPortalObject
()
pending_ticket_list_amount
=
len
(
context
.
Person_getSlapOSPendingTicket
())
notification_message
=
portal
.
portal_notifications
.
getDocumentValue
(
reference
=
"slapos-crm-person-pending-ticket-notification"
)
if
notification_message
is
not
None
:
mapping_dict
=
{
'username'
:
context
.
getTitle
(),
'amount'
:
pending_ticket_list_amount
,
'website'
:
portal
.
portal_preferences
.
getPreferredSlaposWebSiteUrl
()}
return
notification_message
.
getTitle
(),
notification_message
.
asText
(
substitution_method_parameter_dict
=
{
'mapping_dict'
:
mapping_dict
})
message
=
""" You have %s pending tickets """
%
pending_ticket_list_amount
return
message
,
message
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Person_getSlapOSPendingTicketMessageTemplate.xml
0 → 100644
View file @
2a273d72
<?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></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Person_getSlapOSPendingTicketMessageTemplate
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Person_sendPendingTicketReminder.py
0 → 100644
View file @
2a273d72
amount
=
len
(
context
.
Person_getSlapOSPendingTicket
())
if
amount
>
0
:
title
,
reminder_message
=
context
.
Person_getSlapOSPendingTicketMessageTemplate
()
return
context
.
Person_sendSlapOSPendingTicketNotification
(
title
,
reminder_message
,
batch_mode
=
1
)
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Person_sendPendingTicketReminder.xml
0 → 100644
View file @
2a273d72
<?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></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Person_sendPendingTicketReminder
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Person_sendSlapOSPendingTicketNotification.py
0 → 100644
View file @
2a273d72
portal
=
context
.
getPortalObject
()
start_date
=
DateTime
()
# Rely on Trade condition (like in ticket to set the proper sender)
trade_condition
=
portal
.
sale_trade_condition_module
.
slapos_ticket_trade_condition
event_kw
=
{
'portal_type'
:
"Mail Message"
,
'title'
:
response_event_title
,
'resource'
:
"service_module/slapos_crm_information"
,
'source'
:
trade_condition
.
getSource
(),
'destination'
:
context
.
getRelativeUrl
(),
'start_date'
:
start_date
,
'text_content'
:
response_event_text_content
,
'content_type'
:
'text/plain'
,
}
# Create event
event
=
portal
.
event_module
.
newContent
(
**
event_kw
)
event
.
plan
()
event
.
start
(
send_mail
=
True
,
comment
=
"Sent via Person_sendSlapOSPendingTicketNotification"
)
if
batch_mode
:
return
event
message
=
portal
.
Base_translateString
(
'New event created.'
)
return
event
.
Base_redirect
(
keep_items
=
{
'portal_status_message'
:
message
})
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Person_sendSlapOSPendingTicketNotification.xml
0 → 100644
View file @
2a273d72
<?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>
response_event_title, response_event_text_content, batch_mode=False, **kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Person_sendSlapOSPendingTicketNotification
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Person_viewSlapOSPendingTicketDialog.xml
0 → 100644
View file @
2a273d72
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ERP5 Form"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<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/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
Person_sendSlapOSPendingTicketNotification
</string>
</value>
</item>
<item>
<key>
<string>
action_title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
edit_order
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
encoding
</string>
</key>
<value>
<string>
UTF-8
</string>
</value>
</item>
<item>
<key>
<string>
enctype
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
group_list
</string>
</key>
<value>
<list>
<string>
left
</string>
<string>
right
</string>
<string>
center
</string>
<string>
bottom
</string>
<string>
hidden
</string>
</list>
</value>
</item>
<item>
<key>
<string>
groups
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
bottom
</string>
</key>
<value>
<list>
<string>
listbox
</string>
</list>
</value>
</item>
<item>
<key>
<string>
center
</string>
</key>
<value>
<list>
<string>
your_response_event_title
</string>
<string>
your_response_event_text_content
</string>
</list>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<list>
<string>
listbox_delivery_start_date
</string>
</list>
</value>
</item>
<item>
<key>
<string>
left
</string>
</key>
<value>
<list>
<string>
my_title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
right
</string>
</key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Person_viewSlapOSPendingTicketDialog
</string>
</value>
</item>
<item>
<key>
<string>
method
</string>
</key>
<value>
<string>
POST
</string>
</value>
</item>
<item>
<key>
<string>
name
</string>
</key>
<value>
<string>
Person_viewSlapOSPendingTicket
</string>
</value>
</item>
<item>
<key>
<string>
pt
</string>
</key>
<value>
<string>
form_dialog
</string>
</value>
</item>
<item>
<key>
<string>
row_length
</string>
</key>
<value>
<int>
4
</int>
</value>
</item>
<item>
<key>
<string>
stored_encoding
</string>
</key>
<value>
<string>
UTF-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Send Pending Ticket Report
</string>
</value>
</item>
<item>
<key>
<string>
unicode_mode
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
update_action
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
update_action_title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Person_viewSlapOSPendingTicketDialog/listbox.xml
0 → 100644
View file @
2a273d72
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
columns
</string>
<string>
default_params
</string>
<string>
description
</string>
<string>
editable
</string>
<string>
editable_columns
</string>
<string>
list_method
</string>
<string>
portal_types
</string>
<string>
selection_name
</string>
<string>
sort
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
listbox
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
columns
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
editable_columns
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
list_method
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
portal_types
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
selection_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
sort
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
columns
</string>
</key>
<value>
<list>
<tuple>
<string>
getTitle
</string>
<string>
Title
</string>
</tuple>
<tuple>
<string>
translated_portal_type
</string>
<string>
Event Type
</string>
</tuple>
<tuple>
<string>
delivery.start_date
</string>
<string>
Date
</string>
</tuple>
<tuple>
<string>
translated_simulation_state_title
</string>
<string>
State
</string>
</tuple>
</list>
</value>
</item>
<item>
<key>
<string>
default_params
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
List of all Support Requests related to the follow up ticket
</string>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
editable_columns
</string>
</key>
<value>
<list>
<tuple>
<string>
delivery.start_date
</string>
<string>
Date
</string>
</tuple>
</list>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_view_mode_listbox
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
list_method
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
portal_types
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
selection_name
</string>
</key>
<value>
<string>
person_pending_ticket_view_selection
</string>
</value>
</item>
<item>
<key>
<string>
sort
</string>
</key>
<value>
<list>
<tuple>
<string>
delivery.start_date
</string>
<string>
asc
</string>
</tuple>
</list>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Tickets
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Method"
module=
"Products.Formulator.MethodField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
method_name
</string>
</key>
<value>
<string>
Person_getSlapOSPendingTicket
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Person_viewSlapOSPendingTicketDialog/listbox_delivery_start_date.xml
0 → 100644
View file @
2a273d72
This diff is collapsed.
Click to expand it.
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Person_viewSlapOSPendingTicketDialog/my_title.xml
0 → 100644
View file @
2a273d72
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
editable
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_title
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_ticket_title
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewCRMFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Person_viewSlapOSPendingTicketDialog/your_response_event_text_content.xml
0 → 100644
View file @
2a273d72
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
default
</string>
<string>
editable
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
your_response_event_text_content
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
default
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_text_content
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewCRMFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Message
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: context.Person_getSlapOSPendingTicketMessageTemplate()[1]
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Person_viewSlapOSPendingTicketDialog/your_response_event_title.xml
0 → 100644
View file @
2a273d72
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
default
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
your_response_event_title
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
default
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_string_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Title
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: "You have %s pending tickets to take action" % (len(context.Person_getSlapOSPendingTicket()))
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMAlarm.py
View file @
2a273d72
...
...
@@ -763,3 +763,12 @@ class TestSlaposCrmUpdateSupportRequestState(SlapOSTestCaseMixinWithAbort):
alarm
=
self
.
portal
.
portal_alarms
.
\
slapos_crm_update_support_request_state
self
.
_test_alarm
(
alarm
,
support_request
,
"SupportRequest_updateMonitoringState"
)
class
TestSlaposCrmSendPendingTicket_reminder
(
SlapOSTestCaseMixinWithAbort
):
def
test_alarm_send_pending_ticket_reminder
(
self
):
person
=
self
.
makePerson
()
alarm
=
self
.
portal
.
portal_alarms
.
\
slapos_crm_send_pending_ticket_reminder
self
.
_test_alarm
(
alarm
,
person
,
"Person_sendPendingTicketReminder"
)
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMAlarm.xml
View file @
2a273d72
...
...
@@ -6,12 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
testSlapOSCRMAlarm
</string>
</value>
...
...
@@ -55,28 +49,13 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
</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>
...
...
@@ -89,7 +68,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -98,7 +77,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
...
...
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMSkins.py
View file @
2a273d72
...
...
@@ -1400,7 +1400,6 @@ class TestSupportRequestUpdateMonitoringState(SlapOSTestCaseMixin):
support_request
.
getSimulationState
())
class
TestSlapOSFolder_getTicketFeedUrl
(
TestCRMSkinsMixin
):
def
_test
(
self
,
module
):
...
...
@@ -1425,3 +1424,229 @@ class TestSlapOSFolder_getTicketFeedUrl(TestCRMSkinsMixin):
def
test_Folder_getTicketFeedUrl_incident_response_module
(
self
):
self
.
_test
(
self
.
portal
.
incident_response_module
)
class
TestSlapOSPerson_getSlapOSPendingTicket
(
TestCRMSkinsMixin
):
def
test_getSlapOSPendingTicket_support_request
(
self
):
person
=
self
.
makePerson
()
ticket
=
self
.
portal
.
support_request_module
.
newContent
(
\
title
=
"Test Support Request %s"
%
self
.
new_id
,
destination_decision
=
person
.
getRelativeUrl
())
pending_ticket_list
=
person
.
Person_getSlapOSPendingTicket
()
# Not indexed yet
self
.
assertEqual
(
len
(
pending_ticket_list
),
0
)
self
.
tic
()
pending_ticket_list
=
person
.
Person_getSlapOSPendingTicket
()
self
.
assertEqual
(
len
(
pending_ticket_list
),
0
)
ticket
.
submit
()
ticket
.
immediateReindexObject
()
pending_ticket_list
=
person
.
Person_getSlapOSPendingTicket
()
self
.
assertEqual
(
len
(
pending_ticket_list
),
0
)
ticket
.
validate
()
ticket
.
immediateReindexObject
()
pending_ticket_list
=
person
.
Person_getSlapOSPendingTicket
()
self
.
assertEqual
(
len
(
pending_ticket_list
),
0
)
ticket
.
suspend
()
ticket
.
immediateReindexObject
()
pending_ticket_list
=
person
.
Person_getSlapOSPendingTicket
()
self
.
assertEqual
(
len
(
pending_ticket_list
),
1
)
self
.
assertEqual
(
pending_ticket_list
[
0
].
getUid
(),
ticket
.
getUid
())
ticket
.
invalidate
()
ticket
.
immediateReindexObject
()
pending_ticket_list
=
person
.
Person_getSlapOSPendingTicket
()
self
.
assertEqual
(
len
(
pending_ticket_list
),
0
)
def
test_getSlapOSPendingTicket_support_request_cancelled
(
self
):
person
=
self
.
makePerson
()
ticket
=
self
.
portal
.
support_request_module
.
newContent
(
\
title
=
"Test Support Request %s"
%
self
.
new_id
,
destination_decision
=
person
.
getRelativeUrl
())
pending_ticket_list
=
person
.
Person_getSlapOSPendingTicket
()
# Not indexed yet
self
.
assertEqual
(
len
(
pending_ticket_list
),
0
)
self
.
tic
()
pending_ticket_list
=
person
.
Person_getSlapOSPendingTicket
()
self
.
assertEqual
(
len
(
pending_ticket_list
),
0
)
ticket
.
submit
()
ticket
.
immediateReindexObject
()
pending_ticket_list
=
person
.
Person_getSlapOSPendingTicket
()
self
.
assertEqual
(
len
(
pending_ticket_list
),
0
)
ticket
.
cancel
()
ticket
.
immediateReindexObject
()
pending_ticket_list
=
person
.
Person_getSlapOSPendingTicket
()
self
.
assertEqual
(
len
(
pending_ticket_list
),
0
)
def
test_getSlapOSPendingTicket_upgrade_decision
(
self
):
def
newUpgradeDecision
():
ticket
=
self
.
portal
.
upgrade_decision_module
.
newContent
(
portal_type
=
'Upgrade Decision'
,
title
=
"Upgrade Decision Test %s"
%
self
.
new_id
,
reference
=
"TESTUD-%s"
%
self
.
new_id
)
ticket
.
immediateReindexObject
()
return
ticket
person
=
self
.
makePerson
()
ticket
=
newUpgradeDecision
()
ticket
.
setDestinationDecisionValue
(
person
)
ticket
.
newContent
(
portal_type
=
"Upgrade Decision Line"
)
pending_ticket_list
=
person
.
Person_getSlapOSPendingTicket
()
# Not indexed yet
self
.
assertEqual
(
len
(
pending_ticket_list
),
0
)
self
.
tic
()
pending_ticket_list
=
person
.
Person_getSlapOSPendingTicket
()
self
.
assertEqual
(
len
(
pending_ticket_list
),
0
)
ticket
.
plan
()
ticket
.
immediateReindexObject
()
pending_ticket_list
=
person
.
Person_getSlapOSPendingTicket
()
self
.
assertEqual
(
len
(
pending_ticket_list
),
0
)
ticket
.
confirm
()
ticket
.
immediateReindexObject
()
pending_ticket_list
=
person
.
Person_getSlapOSPendingTicket
()
self
.
assertEqual
(
len
(
pending_ticket_list
),
1
)
self
.
assertEqual
(
pending_ticket_list
[
0
].
getUid
(),
ticket
.
getUid
())
ticket
.
start
()
ticket
.
immediateReindexObject
()
pending_ticket_list
=
person
.
Person_getSlapOSPendingTicket
()
self
.
assertEqual
(
len
(
pending_ticket_list
),
0
)
ticket
.
stop
()
ticket
.
immediateReindexObject
()
pending_ticket_list
=
person
.
Person_getSlapOSPendingTicket
()
self
.
assertEqual
(
len
(
pending_ticket_list
),
0
)
ticket
.
deliver
()
ticket
.
immediateReindexObject
()
pending_ticket_list
=
person
.
Person_getSlapOSPendingTicket
()
self
.
assertEqual
(
len
(
pending_ticket_list
),
0
)
def
test_getSlapOSPendingTicket_upgrade_decision_cancel
(
self
):
def
newUpgradeDecision
():
ticket
=
self
.
portal
.
upgrade_decision_module
.
newContent
(
portal_type
=
'Upgrade Decision'
,
title
=
"Upgrade Decision Test %s"
%
self
.
new_id
,
reference
=
"TESTUD-%s"
%
self
.
new_id
)
ticket
.
immediateReindexObject
()
return
ticket
person
=
self
.
makePerson
()
ticket
=
newUpgradeDecision
()
ticket
.
setDestinationDecisionValue
(
person
)
ticket
.
newContent
(
portal_type
=
"Upgrade Decision Line"
)
pending_ticket_list
=
person
.
Person_getSlapOSPendingTicket
()
# Not indexed yet
self
.
assertEqual
(
len
(
pending_ticket_list
),
0
)
self
.
tic
()
pending_ticket_list
=
person
.
Person_getSlapOSPendingTicket
()
self
.
assertEqual
(
len
(
pending_ticket_list
),
0
)
ticket
.
plan
()
ticket
.
immediateReindexObject
()
pending_ticket_list
=
person
.
Person_getSlapOSPendingTicket
()
self
.
assertEqual
(
len
(
pending_ticket_list
),
0
)
ticket
.
cancel
()
ticket
.
immediateReindexObject
()
pending_ticket_list
=
person
.
Person_getSlapOSPendingTicket
()
self
.
assertEqual
(
len
(
pending_ticket_list
),
0
)
class
TestSlapOSPerson_getSlapOSPendingTicketMessageTemplate
(
TestCRMSkinsMixin
):
@
simulate
(
'Person_getSlapOSPendingTicket'
,
'*args, **kwargs'
,
'return range(99)'
)
def
test_getSlapOSPendingTicketMessageTemplate
(
self
):
person
=
self
.
makePerson
()
title
,
message
=
person
.
Person_getSlapOSPendingTicketMessageTemplate
()
self
.
assertEqual
(
""" You have 99 pending tickets """
,
title
)
self
.
assertEqual
(
""" You have 99 pending tickets """
,
message
)
def
_makeNotificationMessage
(
self
):
notification_message
=
self
.
portal
.
notification_message_module
.
newContent
(
portal_type
=
"Notification Message"
,
title
=
'Pending ticket'
,
text_content_substitution_mapping_method_id
=
'NotificationMessage_getSubstitutionMappingDictFromArgument'
,
text_content
=
'Test NM content ${username} AMOUNT (${amount}) WEBSITE(${website})'
,
content_type
=
'text/plain'
,
)
return
notification_message
.
getRelativeUrl
()
@
simulate
(
'Person_getSlapOSPendingTicket'
,
'*args, **kwargs'
,
'return range(99)'
)
@
simulate
(
'NotificationTool_getDocumentValue'
,
'reference=None'
,
'assert reference == "slapos-crm-person-pending-ticket-notification"
\
n
'
\
'return context.restrictedTraverse('
\
'context.REQUEST["test_getSlapOSPendingTicketMessageTemplate"])'
)
def
test_getSlapOSPendingTicketMessageTemplate_with_notification_message
(
self
):
person
=
self
.
makePerson
()
self
.
portal
.
REQUEST
[
'test_getSlapOSPendingTicketMessageTemplate'
]
=
\
self
.
_makeNotificationMessage
()
title
,
message
=
person
.
Person_getSlapOSPendingTicketMessageTemplate
()
self
.
assertEqual
(
'Pending ticket'
,
title
)
self
.
assertEqual
(
'Test NM content Member Template AMOUNT (99) WEBSITE()'
,
message
)
class
TestSlapOSPerson_sendPendingTicketReminder
(
TestCRMSkinsMixin
):
@
simulate
(
'Person_getSlapOSPendingTicket'
,
'*args, **kwargs'
,
'return []'
)
@
simulate
(
'Person_sendSlapOSPendingTicketNotification'
,
'*args, **kwargs'
,
'assert False'
)
def
test_sendPendingTicketReminder
(
self
):
person
=
self
.
makePerson
()
# Script Person_sendSlapOSPendingTicketNotification not called
person
.
Person_sendPendingTicketReminder
()
@
simulate
(
'Person_getSlapOSPendingTicket'
,
'*args, **kwargs'
,
'return [1]'
)
@
simulate
(
'Person_sendSlapOSPendingTicketNotification'
,
'*args, **kwargs'
,
'context.REQUEST.set("test_getSlapOSPendingTicketMessageTemplate", "called")'
)
def
test_sendPendingTicketReminder_positive_amount
(
self
):
person
=
self
.
makePerson
()
person
.
Person_sendPendingTicketReminder
()
self
.
assertEqual
(
self
.
portal
.
REQUEST
[
"test_getSlapOSPendingTicketMessageTemplate"
],
"called"
)
class
TestSlapOSPerson_sendSlapOSPendingTicketNotification
(
TestCRMSkinsMixin
):
def
test_sendSlapOSPendingTicketNotification
(
self
):
person
=
self
.
makePerson
()
event
=
person
.
Person_sendSlapOSPendingTicketNotification
(
"TEST TITLE"
,
"TEST CONTENT"
,
batch_mode
=
1
)
self
.
tic
()
self
.
assertEqual
(
event
.
getTitle
(),
"TEST TITLE"
)
self
.
assertEqual
(
event
.
getTextContent
(),
"TEST CONTENT"
)
self
.
assertEqual
(
event
.
getSimulationState
(),
"started"
)
self
.
assertEqual
(
event
.
getPortalType
(),
"Mail Message"
)
self
.
assertEqual
(
event
.
getDestination
(),
person
.
getRelativeUrl
())
master/bt5/slapos_crm/bt/template_action_path_list
View file @
2a273d72
...
...
@@ -6,6 +6,7 @@ Incident Response | view
Instance Tree Module | slapos_resilience_usage_report
Instance Tree | jump_to_related_upgrade_decision_line
Instance Tree | view_ticket
Person | slapos_user_pending_ticket_report
Regularisation Request Module | rss_view
Regularisation Request Module | view
Regularisation Request | clone_ticket_and_event_list
...
...
master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/ERP5Site_initSlapOSUITest.py
View file @
2a273d72
...
...
@@ -101,4 +101,42 @@ for reference in notification_message_to_enable:
portal
.
portal_catalog
.
getResultValue
(
validation_state
=
'draft'
,
**
search_kw
).
validate
()
# Create an manager user
try
:
demo_manager_user
=
context
.
person_module
[
"demo_manager_user"
]
except
KeyError
:
demo_manager_user
=
context
.
person_module
.
newContent
(
id
=
"demo_manager_user"
,
title
=
"Demo Manager Functional User"
,
portal_type
=
"Person"
,
email
=
"x@example.com"
)
try
:
demo_manager_assignment
=
demo_manager_user
[
"manager_assignment"
]
except
KeyError
:
demo_manager_assignment
=
demo_manager_user
.
newContent
(
id
=
"manager_assignment"
,
title
=
"Demo Manager Functional User Assignment"
,
portal_type
=
"Assignment"
,
)
demo_manager_assignment
.
setGroup
(
'company'
)
if
demo_manager_assignment
.
getValidationState
()
!=
"open"
:
demo_manager_assignment
.
open
()
try
:
demo_manager_login
=
demo_manager_user
[
"demo_manager_login"
]
except
KeyError
:
demo_manager_login
=
demo_manager_user
.
newContent
(
id
=
"demo_manager_login"
,
portal_type
=
"ERP5 Login"
,
reference
=
"demo_manager_functional_user"
)
demo_manager_login
.
setPassword
(
"czz4yt36mshT*"
)
if
demo_manager_login
.
getValidationState
()
!=
"validated"
:
demo_manager_login
.
validate
()
return
"Done."
master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/ERP5Site_initSlapOSUITest.xml
View file @
2a273d72
...
...
@@ -57,6 +57,7 @@
<value>
<tuple>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
...
...
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