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
Léo-Paul Géneau
slapos.core
Commits
d8a16a09
Commit
d8a16a09
authored
Dec 12, 2018
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_crm: Replace immediateReindexObject call
Probably incomplete as we need to check for activities.
parent
2891cfb9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequest_trySendNotificationMessage.py
...m_monitoring/SupportRequest_trySendNotificationMessage.py
+10
-2
No files found.
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequest_trySendNotificationMessage.py
View file @
d8a16a09
...
...
@@ -5,13 +5,20 @@ resource = portal.service_module.slapos_crm_information.getRelativeUrl()
# create Web message if needed for this ticket
last_event
=
context
.
portal_catalog
.
getResultValue
(
title
=
message_title
,
follow_up_uid
=
support_request
.
getUid
(),
follow_up_uid
=
support_request
.
getUid
(),
sort_on
=
[(
'delivery.start_date'
,
'DESC'
)],
)
if
last_event
:
# User has already been notified for this problem.
return
last_event
transactional_event
=
context
.
REQUEST
.
get
(
"support_request_notified_item"
,
None
)
if
transactional_event
is
not
None
:
if
(
transactional_event
.
getFollowUpUid
()
==
support_request
.
getUid
())
and
\
(
transactional_event
.
getTitle
()
==
message_title
):
return
transactional_event
event
=
portal
.
event_module
.
slapos_crm_web_message_template
.
\
Base_createCloneDocument
(
batch_mode
=
1
)
...
...
@@ -27,6 +34,7 @@ event.edit(
event
.
stop
()
event
.
deliver
()
event
.
immediateReindexObject
()
support_request
.
serialize
()
context
.
REQUEST
.
set
(
"support_request_notified_item"
,
event
)
return
event
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