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
8bad5baa
Commit
8bad5baa
authored
7 months ago
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_rss_style: Include Subscription Request portal_type on the rss feed
This allows, in case of error, verbose what to do
parent
c67f0478
No related merge requests found
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
92 additions
and
67 deletions
+92
-67
master/bt5/slapos_rss_style/SkinTemplateItem/portal_skins/slapos_rss_style/Base_getEventList.py
...teItem/portal_skins/slapos_rss_style/Base_getEventList.py
+4
-2
master/bt5/slapos_rss_style/SkinTemplateItem/portal_skins/slapos_rss_style/Base_getTicketRelatedEventList.py
..._skins/slapos_rss_style/Base_getTicketRelatedEventList.py
+1
-1
master/bt5/slapos_rss_style/SkinTemplateItem/portal_skins/slapos_rss_style/ComputeNode_view/listbox.xml
...ortal_skins/slapos_rss_style/ComputeNode_view/listbox.xml
+1
-1
master/bt5/slapos_rss_style/SkinTemplateItem/portal_skins/slapos_rss_style/WebSection_viewCriticalTicketListAsRSS/listbox.xml
..._style/WebSection_viewCriticalTicketListAsRSS/listbox.xml
+21
-6
master/bt5/slapos_rss_style/SkinTemplateItem/portal_skins/slapos_rss_style/WebSection_viewTicketListAsRSS/listbox.xml
...apos_rss_style/WebSection_viewTicketListAsRSS/listbox.xml
+21
-6
master/bt5/slapos_rss_style/TestTemplateItem/portal_components/test.erp5.testSlapOSRSSStyleSkins.py
...em/portal_components/test.erp5.testSlapOSRSSStyleSkins.py
+44
-51
No files found.
master/bt5/slapos_rss_style/SkinTemplateItem/portal_skins/slapos_rss_style/Base_getEventList.py
View file @
8bad5baa
"""Returns all ticket related events for RSS
"""
Returns all ticket related events for RSS
"""
"""
from
Products.PythonScripts.standard
import
Object
from
Products.PythonScripts.standard
import
Object
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
...
@@ -25,7 +26,8 @@ def getTicketInfo(event):
...
@@ -25,7 +26,8 @@ def getTicketInfo(event):
return
getTicket_memo
[
follow_up
]
return
getTicket_memo
[
follow_up
]
if
follow_up_portal_type
is
None
:
if
follow_up_portal_type
is
None
:
follow_up_portal_type
=
[
'Support Request'
,
'Regularisation Request'
,
'Upgrade Decision'
]
follow_up_portal_type
=
[
'Support Request'
,
'Regularisation Request'
,
'Upgrade Decision'
,
'Subscription Request'
]
ticket_simulation_state
=
[
ticket_simulation_state
=
[
'validated'
,
'submitted'
,
'suspended'
,
'invalidated'
,
'validated'
,
'submitted'
,
'suspended'
,
'invalidated'
,
...
...
This diff is collapsed.
Click to expand it.
master/bt5/slapos_rss_style/SkinTemplateItem/portal_skins/slapos_rss_style/Base_getTicketRelatedEventList.py
View file @
8bad5baa
return
context
.
Base_getEventList
(
return
context
.
Base_getEventList
(
list_lines
=
list_lines
,
list_lines
=
list_lines
,
follow_up_portal_type
=
[
'Support Request'
,
'Upgrade Decision'
],
follow_up_portal_type
=
[
'Support Request'
,
'Upgrade Decision'
,
'Subscription Request'
],
context_related
=
True
,
**
kw
)
context_related
=
True
,
**
kw
)
This diff is collapsed.
Click to expand it.
master/bt5/slapos_rss_style/SkinTemplateItem/portal_skins/slapos_rss_style/ComputeNode_view/listbox.xml
View file @
8bad5baa
...
@@ -246,7 +246,7 @@
...
@@ -246,7 +246,7 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
method_name
</string>
</key>
<key>
<string>
method_name
</string>
</key>
<value>
<string>
WebSection_getUserTicke
tList
</string>
</value>
<value>
<string>
Base_getTicketRelatedEven
tList
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
This diff is collapsed.
Click to expand it.
master/bt5/slapos_rss_style/SkinTemplateItem/portal_skins/slapos_rss_style/WebSection_viewCriticalTicketListAsRSS/listbox.xml
View file @
8bad5baa
...
@@ -70,7 +70,9 @@
...
@@ -70,7 +70,9 @@
</item>
</item>
<item>
<item>
<key>
<string>
default_params
</string>
</key>
<key>
<string>
default_params
</string>
</key>
<value>
<string></string>
</value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
editable_columns
</string>
</key>
<key>
<string>
editable_columns
</string>
</key>
...
@@ -91,7 +93,7 @@
...
@@ -91,7 +93,7 @@
<item>
<item>
<key>
<string>
lines
</string>
</key>
<key>
<string>
lines
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</value>
</item>
</item>
<item>
<item>
...
@@ -101,7 +103,7 @@
...
@@ -101,7 +103,7 @@
<item>
<item>
<key>
<string>
selection_name
</string>
</key>
<key>
<string>
selection_name
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</value>
</item>
</item>
<item>
<item>
...
@@ -189,7 +191,7 @@
...
@@ -189,7 +191,7 @@
<item>
<item>
<key>
<string>
list_method
</string>
</key>
<key>
<string>
list_method
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
U
=
</string>
</persistent>
</value>
</value>
</item>
</item>
<item>
<item>
...
@@ -220,7 +222,7 @@
...
@@ -220,7 +222,7 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
_text
</string>
</key>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python:
int(here.REQUEST.get(\'size\', preferences.getPreference(\'preferred_listbox_list_mode_line_count\', 30)))
</string>
</value>
<value>
<string>
python:
[[\'user_restricted\', 1]]
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
@@ -233,12 +235,25 @@
...
@@ -233,12 +235,25 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
_text
</string>
</key>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python:
\'%s_ticket_rss_selection\' % here.getId(
)
</string>
</value>
<value>
<string>
python:
int(here.REQUEST.get(\'size\', preferences.getPreference(\'preferred_listbox_list_mode_line_count\', 30))
)
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python:\'%s_ticket_rss_selection\' % here.getId()
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<pickle>
<pickle>
<global
name=
"Method"
module=
"Products.Formulator.MethodField"
/>
<global
name=
"Method"
module=
"Products.Formulator.MethodField"
/>
</pickle>
</pickle>
...
...
This diff is collapsed.
Click to expand it.
master/bt5/slapos_rss_style/SkinTemplateItem/portal_skins/slapos_rss_style/WebSection_viewTicketListAsRSS/listbox.xml
View file @
8bad5baa
...
@@ -70,7 +70,9 @@
...
@@ -70,7 +70,9 @@
</item>
</item>
<item>
<item>
<key>
<string>
default_params
</string>
</key>
<key>
<string>
default_params
</string>
</key>
<value>
<string></string>
</value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
editable_columns
</string>
</key>
<key>
<string>
editable_columns
</string>
</key>
...
@@ -91,7 +93,7 @@
...
@@ -91,7 +93,7 @@
<item>
<item>
<key>
<string>
lines
</string>
</key>
<key>
<string>
lines
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</value>
</item>
</item>
<item>
<item>
...
@@ -101,7 +103,7 @@
...
@@ -101,7 +103,7 @@
<item>
<item>
<key>
<string>
selection_name
</string>
</key>
<key>
<string>
selection_name
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</value>
</item>
</item>
<item>
<item>
...
@@ -189,7 +191,7 @@
...
@@ -189,7 +191,7 @@
<item>
<item>
<key>
<string>
list_method
</string>
</key>
<key>
<string>
list_method
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
U
=
</string>
</persistent>
</value>
</value>
</item>
</item>
<item>
<item>
...
@@ -220,7 +222,7 @@
...
@@ -220,7 +222,7 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
_text
</string>
</key>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python:
int(here.REQUEST.get(\'size\', preferences.getPreference(\'preferred_listbox_list_mode_line_count\', 30)))
</string>
</value>
<value>
<string>
python:
[[\'user_restricted\', 1]]
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
@@ -233,12 +235,25 @@
...
@@ -233,12 +235,25 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
_text
</string>
</key>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python:
\'%s_ticket_rss_selection\' % here.getId(
)
</string>
</value>
<value>
<string>
python:
int(here.REQUEST.get(\'size\', preferences.getPreference(\'preferred_listbox_list_mode_line_count\', 30))
)
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python:\'%s_ticket_rss_selection\' % here.getId()
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<pickle>
<pickle>
<global
name=
"Method"
module=
"Products.Formulator.MethodField"
/>
<global
name=
"Method"
module=
"Products.Formulator.MethodField"
/>
</pickle>
</pickle>
...
...
This diff is collapsed.
Click to expand it.
master/bt5/slapos_rss_style/TestTemplateItem/portal_components/test.erp5.testSlapOSRSSStyleSkins.py
View file @
8bad5baa
...
@@ -225,7 +225,7 @@ class TestSlapOSFolder_getOpenTicketList(TestRSSSyleSkinsMixin):
...
@@ -225,7 +225,7 @@ class TestSlapOSFolder_getOpenTicketList(TestRSSSyleSkinsMixin):
module
=
ticket
.
getParentValue
()
module
=
ticket
.
getParentValue
()
self
.
portal
.
portal_skins
.
changeSkin
(
'RSS'
)
self
.
portal
.
portal_skins
.
changeSkin
(
'RSS'
)
open_ticket_list
=
module
.
Folder_getOpenTicketList
()
open_ticket_list
=
module
.
Folder_getOpenTicketList
(
list_lines
=
1000
)
self
.
assertEqual
(
len
(
open_ticket_list
),
expected_amount
)
self
.
assertEqual
(
len
(
open_ticket_list
),
expected_amount
)
self
.
assertNotEqual
(
open_ticket_list
[
0
].
pubDate
,
None
)
self
.
assertNotEqual
(
open_ticket_list
[
0
].
pubDate
,
None
)
self
.
assertEqual
(
open_ticket_list
[
0
].
guid
,
self
.
assertEqual
(
open_ticket_list
[
0
].
guid
,
...
@@ -235,7 +235,7 @@ class TestSlapOSFolder_getOpenTicketList(TestRSSSyleSkinsMixin):
...
@@ -235,7 +235,7 @@ class TestSlapOSFolder_getOpenTicketList(TestRSSSyleSkinsMixin):
ticket
.
validate
()
ticket
.
validate
()
self
.
tic
()
self
.
tic
()
self
.
portal
.
portal_skins
.
changeSkin
(
'RSS'
)
self
.
portal
.
portal_skins
.
changeSkin
(
'RSS'
)
open_ticket_list
=
module
.
Folder_getOpenTicketList
()
open_ticket_list
=
module
.
Folder_getOpenTicketList
(
list_lines
=
1000
)
self
.
assertEqual
(
len
(
open_ticket_list
),
expected_amount
)
self
.
assertEqual
(
len
(
open_ticket_list
),
expected_amount
)
self
.
assertNotEqual
(
open_ticket_list
[
0
].
pubDate
,
None
)
self
.
assertNotEqual
(
open_ticket_list
[
0
].
pubDate
,
None
)
self
.
assertEqual
(
open_ticket_list
[
0
].
guid
,
self
.
assertEqual
(
open_ticket_list
[
0
].
guid
,
...
@@ -245,7 +245,7 @@ class TestSlapOSFolder_getOpenTicketList(TestRSSSyleSkinsMixin):
...
@@ -245,7 +245,7 @@ class TestSlapOSFolder_getOpenTicketList(TestRSSSyleSkinsMixin):
ticket
.
suspend
()
ticket
.
suspend
()
self
.
tic
()
self
.
tic
()
self
.
portal
.
portal_skins
.
changeSkin
(
'RSS'
)
self
.
portal
.
portal_skins
.
changeSkin
(
'RSS'
)
open_ticket_list
=
module
.
Folder_getOpenTicketList
()
open_ticket_list
=
module
.
Folder_getOpenTicketList
(
list_lines
=
1000
)
self
.
assertEqual
(
len
(
open_ticket_list
),
expected_amount
)
self
.
assertEqual
(
len
(
open_ticket_list
),
expected_amount
)
self
.
assertNotEqual
(
open_ticket_list
[
0
].
pubDate
,
None
)
self
.
assertNotEqual
(
open_ticket_list
[
0
].
pubDate
,
None
)
self
.
assertEqual
(
open_ticket_list
[
0
].
guid
,
self
.
assertEqual
(
open_ticket_list
[
0
].
guid
,
...
@@ -255,7 +255,7 @@ class TestSlapOSFolder_getOpenTicketList(TestRSSSyleSkinsMixin):
...
@@ -255,7 +255,7 @@ class TestSlapOSFolder_getOpenTicketList(TestRSSSyleSkinsMixin):
ticket
.
invalidate
()
ticket
.
invalidate
()
self
.
tic
()
self
.
tic
()
self
.
portal
.
portal_skins
.
changeSkin
(
'RSS'
)
self
.
portal
.
portal_skins
.
changeSkin
(
'RSS'
)
open_ticket_list
=
module
.
Folder_getOpenTicketList
()
open_ticket_list
=
module
.
Folder_getOpenTicketList
(
list_lines
=
1000
)
self
.
assertEqual
(
len
(
open_ticket_list
),
expected_amount
)
self
.
assertEqual
(
len
(
open_ticket_list
),
expected_amount
)
# Extra checks
# Extra checks
self
.
assertNotEqual
(
open_ticket_list
[
0
].
pubDate
,
None
)
self
.
assertNotEqual
(
open_ticket_list
[
0
].
pubDate
,
None
)
...
@@ -272,19 +272,19 @@ class TestSlapOSFolder_getOpenTicketList(TestRSSSyleSkinsMixin):
...
@@ -272,19 +272,19 @@ class TestSlapOSFolder_getOpenTicketList(TestRSSSyleSkinsMixin):
self
.
assertNotEqual
(
event
,
None
)
self
.
assertNotEqual
(
event
,
None
)
module
=
ticket
.
getParentValue
()
module
=
ticket
.
getParentValue
()
self
.
portal
.
portal_skins
.
changeSkin
(
'RSS'
)
self
.
portal
.
portal_skins
.
changeSkin
(
'RSS'
)
open_ticket_list
=
module
.
Folder_getOpenTicketList
()
open_ticket_list
=
module
.
Folder_getOpenTicketList
(
list_lines
=
1000
)
self
.
assertEqual
(
len
(
open_ticket_list
),
expected_amount
-
1
)
self
.
assertEqual
(
len
(
open_ticket_list
),
expected_amount
-
1
)
ticket
.
plan
()
ticket
.
plan
()
self
.
tic
()
self
.
tic
()
self
.
portal
.
portal_skins
.
changeSkin
(
'RSS'
)
self
.
portal
.
portal_skins
.
changeSkin
(
'RSS'
)
open_ticket_list
=
module
.
Folder_getOpenTicketList
()
open_ticket_list
=
module
.
Folder_getOpenTicketList
(
list_lines
=
1000
)
self
.
assertEqual
(
len
(
open_ticket_list
),
expected_amount
-
1
)
self
.
assertEqual
(
len
(
open_ticket_list
),
expected_amount
-
1
)
ticket
.
confirm
()
ticket
.
confirm
()
self
.
tic
()
self
.
tic
()
self
.
portal
.
portal_skins
.
changeSkin
(
'RSS'
)
self
.
portal
.
portal_skins
.
changeSkin
(
'RSS'
)
open_ticket_list
=
module
.
Folder_getOpenTicketList
()
open_ticket_list
=
module
.
Folder_getOpenTicketList
(
list_lines
=
1000
)
self
.
assertEqual
(
len
(
open_ticket_list
),
expected_amount
)
self
.
assertEqual
(
len
(
open_ticket_list
),
expected_amount
)
self
.
assertNotEqual
(
open_ticket_list
[
0
].
pubDate
,
None
)
self
.
assertNotEqual
(
open_ticket_list
[
0
].
pubDate
,
None
)
...
@@ -301,7 +301,7 @@ class TestSlapOSFolder_getOpenTicketList(TestRSSSyleSkinsMixin):
...
@@ -301,7 +301,7 @@ class TestSlapOSFolder_getOpenTicketList(TestRSSSyleSkinsMixin):
self
.
login
(
ticket
.
getDestinationDecisionValue
().
getUserId
())
self
.
login
(
ticket
.
getDestinationDecisionValue
().
getUserId
())
self
.
portal
.
portal_skins
.
changeSkin
(
'RSS'
)
self
.
portal
.
portal_skins
.
changeSkin
(
'RSS'
)
open_ticket_list
=
module
.
Folder_getOpenTicketList
()
open_ticket_list
=
module
.
Folder_getOpenTicketList
(
list_lines
=
1000
)
self
.
assertEqual
(
len
(
open_ticket_list
),
expected_amount
)
self
.
assertEqual
(
len
(
open_ticket_list
),
expected_amount
)
self
.
assertNotEqual
(
open_ticket_list
[
0
].
pubDate
,
None
)
self
.
assertNotEqual
(
open_ticket_list
[
0
].
pubDate
,
None
)
self
.
assertEqual
(
open_ticket_list
[
0
].
guid
,
self
.
assertEqual
(
open_ticket_list
[
0
].
guid
,
...
@@ -311,7 +311,7 @@ class TestSlapOSFolder_getOpenTicketList(TestRSSSyleSkinsMixin):
...
@@ -311,7 +311,7 @@ class TestSlapOSFolder_getOpenTicketList(TestRSSSyleSkinsMixin):
ticket
.
stop
()
ticket
.
stop
()
self
.
tic
()
self
.
tic
()
self
.
portal
.
portal_skins
.
changeSkin
(
'RSS'
)
self
.
portal
.
portal_skins
.
changeSkin
(
'RSS'
)
open_ticket_list
=
module
.
Folder_getOpenTicketList
()
open_ticket_list
=
module
.
Folder_getOpenTicketList
(
list_lines
=
1000
)
self
.
assertEqual
(
len
(
open_ticket_list
),
expected_amount
)
self
.
assertEqual
(
len
(
open_ticket_list
),
expected_amount
)
self
.
assertNotEqual
(
open_ticket_list
[
0
].
pubDate
,
None
)
self
.
assertNotEqual
(
open_ticket_list
[
0
].
pubDate
,
None
)
self
.
assertEqual
(
open_ticket_list
[
0
].
guid
,
self
.
assertEqual
(
open_ticket_list
[
0
].
guid
,
...
@@ -321,7 +321,7 @@ class TestSlapOSFolder_getOpenTicketList(TestRSSSyleSkinsMixin):
...
@@ -321,7 +321,7 @@ class TestSlapOSFolder_getOpenTicketList(TestRSSSyleSkinsMixin):
ticket
.
deliver
()
ticket
.
deliver
()
self
.
tic
()
self
.
tic
()
self
.
portal
.
portal_skins
.
changeSkin
(
'RSS'
)
self
.
portal
.
portal_skins
.
changeSkin
(
'RSS'
)
open_ticket_list
=
module
.
Folder_getOpenTicketList
()
open_ticket_list
=
module
.
Folder_getOpenTicketList
(
list_lines
=
1000
)
self
.
assertEqual
(
len
(
open_ticket_list
),
expected_amount
)
self
.
assertEqual
(
len
(
open_ticket_list
),
expected_amount
)
self
.
assertNotEqual
(
open_ticket_list
[
0
].
pubDate
,
None
)
self
.
assertNotEqual
(
open_ticket_list
[
0
].
pubDate
,
None
)
self
.
assertEqual
(
open_ticket_list
[
0
].
guid
,
self
.
assertEqual
(
open_ticket_list
[
0
].
guid
,
...
@@ -340,7 +340,7 @@ class TestSlapOSFolder_getOpenTicketList(TestRSSSyleSkinsMixin):
...
@@ -340,7 +340,7 @@ class TestSlapOSFolder_getOpenTicketList(TestRSSSyleSkinsMixin):
self
.
login
(
person
.
getUserId
())
self
.
login
(
person
.
getUserId
())
initial_amount
=
len
(
initial_amount
=
len
(
self
.
portal
.
support_request_module
.
Folder_getOpenTicketList
())
self
.
portal
.
support_request_module
.
Folder_getOpenTicketList
(
list_lines
=
1000
))
self
.
login
()
self
.
login
()
ticket
=
self
.
newSupportRequest
(
customer
,
instance_tree
)
ticket
=
self
.
newSupportRequest
(
customer
,
instance_tree
)
...
@@ -364,7 +364,7 @@ class TestSlapOSFolder_getOpenTicketList(TestRSSSyleSkinsMixin):
...
@@ -364,7 +364,7 @@ class TestSlapOSFolder_getOpenTicketList(TestRSSSyleSkinsMixin):
self
.
login
(
person
.
getUserId
())
self
.
login
(
person
.
getUserId
())
initial_amount
=
len
(
initial_amount
=
len
(
self
.
portal
.
regularisation_request_module
.
Folder_getOpenTicketList
())
self
.
portal
.
regularisation_request_module
.
Folder_getOpenTicketList
(
list_lines
=
1000
))
self
.
login
()
self
.
login
()
ticket
=
self
.
newRegularisationRequest
(
customer
)
ticket
=
self
.
newRegularisationRequest
(
customer
)
...
@@ -390,7 +390,7 @@ class TestSlapOSFolder_getOpenTicketList(TestRSSSyleSkinsMixin):
...
@@ -390,7 +390,7 @@ class TestSlapOSFolder_getOpenTicketList(TestRSSSyleSkinsMixin):
self
.
login
(
person
.
getUserId
())
self
.
login
(
person
.
getUserId
())
initial_amount
=
len
(
initial_amount
=
len
(
self
.
portal
.
upgrade_decision_module
.
Folder_getOpenTicketList
())
self
.
portal
.
upgrade_decision_module
.
Folder_getOpenTicketList
(
list_lines
=
1000
))
self
.
login
()
self
.
login
()
ticket
=
self
.
newUpgradeDecision
(
person2
,
project
,
None
)
ticket
=
self
.
newUpgradeDecision
(
person2
,
project
,
None
)
...
@@ -629,6 +629,13 @@ class TestSlapOSBase_getTicketRelatedEventList(TestRSSSyleSkinsMixin):
...
@@ -629,6 +629,13 @@ class TestSlapOSBase_getTicketRelatedEventList(TestRSSSyleSkinsMixin):
class
TestSlapOSBase_getEventList
(
TestRSSSyleSkinsMixin
):
class
TestSlapOSBase_getEventList
(
TestRSSSyleSkinsMixin
):
def
assertTicketAndEvent
(
self
,
open_ticket_list
,
event
,
amount
):
self
.
assertEqual
(
len
(
open_ticket_list
),
amount
)
self
.
assertNotEqual
(
open_ticket_list
[
0
].
pubDate
,
None
)
self
.
assertEqual
(
open_ticket_list
[
0
].
guid
,
'{}-{}'
.
format
(
event
.
getFollowUp
(),
event
.
getRelativeUrl
()))
def
test_Base_getEventList
(
self
):
def
test_Base_getEventList
(
self
):
# Base_getEventList is already widely tested on Base_getTicketRelatedEventList
# Base_getEventList is already widely tested on Base_getTicketRelatedEventList
# and Folder_getOpenTicketList, so we only tested the specific use case of
# and Folder_getOpenTicketList, so we only tested the specific use case of
...
@@ -649,12 +656,9 @@ class TestSlapOSBase_getEventList(TestRSSSyleSkinsMixin):
...
@@ -649,12 +656,9 @@ class TestSlapOSBase_getEventList(TestRSSSyleSkinsMixin):
self
.
assertNotEqual
(
event
,
None
)
self
.
assertNotEqual
(
event
,
None
)
self
.
portal
.
portal_skins
.
changeSkin
(
'RSS'
)
self
.
portal
.
portal_skins
.
changeSkin
(
'RSS'
)
open_ticket_list
=
self
.
portal
.
Base_getEventList
()
self
.
assertTicketAndEvent
(
self
.
portal
.
Base_getEventList
(),
event
,
1
)
self
.
assertEqual
(
len
(
open_ticket_list
),
1
)
self
.
assertTicketAndEvent
(
self
.
portal
.
Base_getEventList
(
self
.
assertNotEqual
(
open_ticket_list
[
0
].
pubDate
,
None
)
user_restricted
=
1
),
event
,
1
)
self
.
assertEqual
(
open_ticket_list
[
0
].
guid
,
'{}-{}'
.
format
(
event
.
getFollowUp
(),
event
.
getRelativeUrl
()))
self
.
login
()
self
.
login
()
ticket
.
validate
()
ticket
.
validate
()
...
@@ -662,12 +666,9 @@ class TestSlapOSBase_getEventList(TestRSSSyleSkinsMixin):
...
@@ -662,12 +666,9 @@ class TestSlapOSBase_getEventList(TestRSSSyleSkinsMixin):
self
.
login
(
person
.
getUserId
())
self
.
login
(
person
.
getUserId
())
self
.
portal
.
portal_skins
.
changeSkin
(
'RSS'
)
self
.
portal
.
portal_skins
.
changeSkin
(
'RSS'
)
open_ticket_list
=
self
.
portal
.
Base_getEventList
()
self
.
assertTicketAndEvent
(
self
.
portal
.
Base_getEventList
(),
event
,
1
)
self
.
assertEqual
(
len
(
open_ticket_list
),
1
)
self
.
assertTicketAndEvent
(
self
.
portal
.
Base_getEventList
(
self
.
assertNotEqual
(
open_ticket_list
[
0
].
pubDate
,
None
)
user_restricted
=
1
),
event
,
1
)
self
.
assertEqual
(
open_ticket_list
[
0
].
guid
,
'{}-{}'
.
format
(
event
.
getFollowUp
(),
event
.
getRelativeUrl
()))
self
.
login
()
self
.
login
()
ticket
.
suspend
()
ticket
.
suspend
()
...
@@ -675,12 +676,9 @@ class TestSlapOSBase_getEventList(TestRSSSyleSkinsMixin):
...
@@ -675,12 +676,9 @@ class TestSlapOSBase_getEventList(TestRSSSyleSkinsMixin):
self
.
login
(
person
.
getUserId
())
self
.
login
(
person
.
getUserId
())
self
.
portal
.
portal_skins
.
changeSkin
(
'RSS'
)
self
.
portal
.
portal_skins
.
changeSkin
(
'RSS'
)
open_ticket_list
=
self
.
portal
.
Base_getEventList
()
self
.
assertTicketAndEvent
(
self
.
portal
.
Base_getEventList
(),
event
,
1
)
self
.
assertEqual
(
len
(
open_ticket_list
),
1
)
self
.
assertTicketAndEvent
(
self
.
portal
.
Base_getEventList
(
self
.
assertNotEqual
(
open_ticket_list
[
0
].
pubDate
,
None
)
user_restricted
=
1
),
event
,
1
)
self
.
assertEqual
(
open_ticket_list
[
0
].
guid
,
'{}-{}'
.
format
(
event
.
getFollowUp
(),
event
.
getRelativeUrl
()))
self
.
login
()
self
.
login
()
ticket
.
invalidate
()
ticket
.
invalidate
()
...
@@ -711,12 +709,14 @@ class TestSlapOSBase_getEventList(TestRSSSyleSkinsMixin):
...
@@ -711,12 +709,14 @@ class TestSlapOSBase_getEventList(TestRSSSyleSkinsMixin):
self
.
portal
.
portal_skins
.
changeSkin
(
'RSS'
)
self
.
portal
.
portal_skins
.
changeSkin
(
'RSS'
)
open_ticket_list
=
self
.
portal
.
Base_getEventList
()
open_ticket_list
=
self
.
portal
.
Base_getEventList
()
self
.
assert
Equal
(
len
(
open_ticket_list
)
,
2
)
self
.
assert
TicketAndEvent
(
open_ticket_list
,
event_rr
,
2
)
self
.
assertNotEqual
(
open_ticket_list
[
0
].
pubDate
,
None
)
# check if previous still the same
self
.
assertEqual
(
open_ticket_list
[
0
].
guid
,
self
.
assertEqual
(
open_ticket_list
[
1
].
guid
,
'{}-{}'
.
format
(
event
_rr
.
getFollowUp
(),
'{}-{}'
.
format
(
event
.
getFollowUp
(),
event
_rr
.
getRelativeUrl
()))
event
.
getRelativeUrl
()))
open_ticket_list
=
self
.
portal
.
Base_getEventList
(
user_restricted
=
1
)
self
.
assertTicketAndEvent
(
open_ticket_list
,
event_rr
,
2
)
# check if previous still the same
# check if previous still the same
self
.
assertEqual
(
open_ticket_list
[
1
].
guid
,
self
.
assertEqual
(
open_ticket_list
[
1
].
guid
,
'{}-{}'
.
format
(
event
.
getFollowUp
(),
'{}-{}'
.
format
(
event
.
getFollowUp
(),
...
@@ -728,12 +728,9 @@ class TestSlapOSBase_getEventList(TestRSSSyleSkinsMixin):
...
@@ -728,12 +728,9 @@ class TestSlapOSBase_getEventList(TestRSSSyleSkinsMixin):
self
.
login
(
person
.
getUserId
())
self
.
login
(
person
.
getUserId
())
self
.
portal
.
portal_skins
.
changeSkin
(
'RSS'
)
self
.
portal
.
portal_skins
.
changeSkin
(
'RSS'
)
open_ticket_list
=
self
.
portal
.
Base_getEventList
()
self
.
assertTicketAndEvent
(
self
.
portal
.
Base_getEventList
(),
event_rr
,
2
)
self
.
assertEqual
(
len
(
open_ticket_list
),
2
)
self
.
assertTicketAndEvent
(
self
.
assertNotEqual
(
open_ticket_list
[
0
].
pubDate
,
None
)
self
.
portal
.
Base_getEventList
(
user_restricted
=
1
),
event_rr
,
2
)
self
.
assertEqual
(
open_ticket_list
[
0
].
guid
,
'{}-{}'
.
format
(
event_rr
.
getFollowUp
(),
event_rr
.
getRelativeUrl
()))
self
.
login
()
self
.
login
()
regularisation_request
.
suspend
()
regularisation_request
.
suspend
()
...
@@ -741,12 +738,9 @@ class TestSlapOSBase_getEventList(TestRSSSyleSkinsMixin):
...
@@ -741,12 +738,9 @@ class TestSlapOSBase_getEventList(TestRSSSyleSkinsMixin):
self
.
login
(
person
.
getUserId
())
self
.
login
(
person
.
getUserId
())
self
.
portal
.
portal_skins
.
changeSkin
(
'RSS'
)
self
.
portal
.
portal_skins
.
changeSkin
(
'RSS'
)
open_ticket_list
=
self
.
portal
.
Base_getEventList
()
self
.
assertTicketAndEvent
(
self
.
portal
.
Base_getEventList
(),
event_rr
,
2
)
self
.
assertEqual
(
len
(
open_ticket_list
),
2
)
self
.
assertTicketAndEvent
(
self
.
assertNotEqual
(
open_ticket_list
[
0
].
pubDate
,
None
)
self
.
portal
.
Base_getEventList
(
user_restricted
=
1
),
event_rr
,
2
)
self
.
assertEqual
(
open_ticket_list
[
0
].
guid
,
'{}-{}'
.
format
(
event_rr
.
getFollowUp
(),
event_rr
.
getRelativeUrl
()))
self
.
login
()
self
.
login
()
regularisation_request
.
invalidate
()
regularisation_request
.
invalidate
()
...
@@ -767,7 +761,6 @@ class TestSlapOSBase_getEventList(TestRSSSyleSkinsMixin):
...
@@ -767,7 +761,6 @@ class TestSlapOSBase_getEventList(TestRSSSyleSkinsMixin):
regularisation_request
.
getTitle
())
regularisation_request
.
getTitle
())
# Now add one Upgrade Decision
# Now add one Upgrade Decision
self
.
login
()
self
.
login
()
sleep
(
2
)
sleep
(
2
)
upgrade_decision
=
self
.
newUpgradeDecision
(
person
,
None
,
None
)
upgrade_decision
=
self
.
newUpgradeDecision
(
person
,
None
,
None
)
...
@@ -852,6 +845,8 @@ class TestSlapOSBase_getEventList(TestRSSSyleSkinsMixin):
...
@@ -852,6 +845,8 @@ class TestSlapOSBase_getEventList(TestRSSSyleSkinsMixin):
self
.
assertEqual
(
open_ticket_list
[
2
].
title
,
self
.
assertEqual
(
open_ticket_list
[
2
].
title
,
ticket
.
getTitle
())
ticket
.
getTitle
())
class
TestBase_getTicketUrl
(
TestRSSSyleSkinsMixin
):
class
TestBase_getTicketUrl
(
TestRSSSyleSkinsMixin
):
def
test_Base_getTicketUrl
(
self
):
def
test_Base_getTicketUrl
(
self
):
ticket
=
self
.
portal
.
support_request_module
.
newContent
(
\
ticket
=
self
.
portal
.
support_request_module
.
newContent
(
\
...
@@ -912,5 +907,3 @@ class TestSlapOSSaleInvoiceTransaction_getRSSTitleAndDescription(TestRSSSyleSkin
...
@@ -912,5 +907,3 @@ class TestSlapOSSaleInvoiceTransaction_getRSSTitleAndDescription(TestRSSSyleSkin
self
.
assertEqual
(
self
.
assertEqual
(
invoice_via_website
.
SaleInvoiceTransaction_getRSSTitle
(),
invoice_via_website
.
SaleInvoiceTransaction_getRSSTitle
(),
"[SlapOS Master Panel] %s %s - (01/02/2018)"
%
(
text
,
invoice
.
getReference
()))
"[SlapOS Master Panel] %s %s - (01/02/2018)"
%
(
text
,
invoice
.
getReference
()))
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