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
1
Merge Requests
1
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
Romain Courteaud
slapos.core
Commits
d9341273
Commit
d9341273
authored
Sep 28, 2023
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_crm: unify event creation
Reuse Ticket_createProjectEvent
parent
a752966e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
16 deletions
+10
-16
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/RegularisationRequest_checkToSendUniqEvent.py
.../slapos_crm/RegularisationRequest_checkToSendUniqEvent.py
+9
-15
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/RegularisationRequest_checkToSendUniqEvent.xml
...slapos_crm/RegularisationRequest_checkToSendUniqEvent.xml
+1
-1
No files found.
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/RegularisationRequest_checkToSendUniqEvent.py
View file @
d9341273
...
...
@@ -18,8 +18,8 @@ event_portal_type = "Mail Message"
event
=
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
event_portal_type
,
default_resource
_uid
=
service
.
getUid
(),
default_follow_up
_uid
=
ticket
.
getUid
(),
resource_
_uid
=
service
.
getUid
(),
follow_up_
_uid
=
ticket
.
getUid
(),
)
if
(
event
is
None
)
and
(
ticket
.
getSimulationState
()
==
'suspended'
):
...
...
@@ -31,21 +31,15 @@ if (event is None) and (ticket.getSimulationState() == 'suspended'):
# Prevent concurrent transaction to create 2 events for the same ticket
ticket
.
edit
(
resource
=
service_relative_url
)
event
=
portal
.
event_module
.
newContent
(
portal_type
=
event_portal_type
,
start_date
=
DateTime
(),
destination
=
ticket
.
getDestination
(),
follow_up
=
ticket
.
getRelativeUrl
(),
source
=
context
.
getSource
(),
title
=
title
,
resource
=
service_relative_url
,
event
=
ticket
.
Ticket_createProjectEvent
(
title
,
'outgoing'
,
'Mail Message'
,
service_relative_url
,
text_content
=
text_content
,
source_project_value
=
ticket
.
getSourceProjectValue
(),
content_type
=
'text/plain'
,
notification_message
=
notification_message
,
substitution_method_parameter_dict
=
substitution_method_parameter_dict
,
comment
=
comment
)
event
.
start
(
send_mail
=
True
,
comment
=
comment
)
event
.
stop
(
comment
=
comment
)
event
.
deliver
(
comment
=
comment
)
event
.
reindexObject
(
activate_kw
=
{
'tag'
:
tag
})
return
event
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/RegularisationRequest_checkToSendUniqEvent.xml
View file @
d9341273
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
service_relative_url, title, text_content, comment, REQUEST=None
</string>
</value>
<value>
<string>
service_relative_url, title, text_content, comment,
notification_message=None, substitution_method_parameter_dict=None,
REQUEST=None
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
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