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
2a5fb9ab
Commit
2a5fb9ab
authored
Oct 27, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_rss_style: follow the new ticket/event structure
parent
4ec00b55
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
265 additions
and
475 deletions
+265
-475
master/bt5/slapos_rss_style/SkinTemplateItem/portal_skins/slapos_rss_style/Base_getEventList.py
...teItem/portal_skins/slapos_rss_style/Base_getEventList.py
+15
-7
master/bt5/slapos_rss_style/SkinTemplateItem/portal_skins/slapos_rss_style/Folder_getOpenTicketList.py
...portal_skins/slapos_rss_style/Folder_getOpenTicketList.py
+1
-1
master/bt5/slapos_rss_style/TestTemplateItem/portal_components/test.erp5.testSlapOSRSSStyleSkins.py
...em/portal_components/test.erp5.testSlapOSRSSStyleSkins.py
+249
-467
No files found.
master/bt5/slapos_rss_style/SkinTemplateItem/portal_skins/slapos_rss_style/Base_getEventList.py
View file @
2a5fb9ab
...
...
@@ -27,21 +27,29 @@ def getTicketInfo(event):
if
follow_up_portal_type
is
None
:
follow_up_portal_type
=
[
'Support Request'
,
'Regularisation Request'
,
'Upgrade Decision'
]
ticket_simulation_state
=
[
'validated'
,
'submitted'
,
'suspended'
,
'invalidated'
,
# Unfortunally Upgrade decision uses diferent states.
'confirmed'
,
'started'
,
'stopped'
,
'delivered'
]
context_kw
=
{}
if
context_related
:
context_kw
[
'follow_up_default_or_child_aggregate_uid'
]
=
context
.
getUid
()
context_kw
[
'follow_up__uid'
]
=
[
x
.
getUid
()
for
x
in
portal
.
portal_catalog
(
causality__uid
=
context
.
getUid
(),
portal_type
=
follow_up_portal_type
,
simulation_state
=
ticket_simulation_state
)]
or
[
-
1
]
else
:
context_kw
[
'follow_up__simulation_state'
]
=
ticket_simulation_state
context_kw
[
'follow_up__portal_type'
]
=
follow_up_portal_type
data_list
=
[]
for
brain
in
portal
.
portal_simulation
.
getMovementHistoryList
(
security_query
=
portal
.
portal_catalog
.
getSecurityQuery
(),
# Limit only to listable portal types
portal_type
=
[
'Web Message'
,
'Mail Nessage'
],
follow_up_simulation_state
=
[
'validated'
,
'submitted'
,
'suspended'
,
'invalidated'
,
# Unfortunally Upgrade decision uses diferent states.
'confirmed'
,
'started'
,
'stopped'
,
'delivered'
],
portal_type
=
[
'Web Message'
,
'Mail Message'
],
only_accountable
=
False
,
follow_up_portal_type
=
follow_up_portal_type
,
omit_input
=
True
,
simulation_state
=
(
'started'
,
'stopped'
,
'delivered'
),
limit
=
list_lines
,
sort_on
=
((
'stock.date'
,
'desc'
),
...
...
master/bt5/slapos_rss_style/SkinTemplateItem/portal_skins/slapos_rss_style/Folder_getOpenTicketList.py
View file @
2a5fb9ab
return
context
.
Base_getEventList
(
list_lines
=
list_lines
,
follow_up_portal_type
=
context
.
getVisibleAllowedContentTypeList
(),
context_related
=
False
,
**
kw
)
**
kw
)
master/bt5/slapos_rss_style/TestTemplateItem/portal_components/test.erp5.testSlapOSRSSStyleSkins.py
View file @
2a5fb9ab
This diff is collapsed.
Click to expand it.
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