Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
45a23b27
Commit
45a23b27
authored
Nov 13, 2018
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
officejs_support_request_ui: Tolerate Events with non visible attachments in RSS
parent
9d147ce2
Pipeline
#5612
failed with stage
in 0 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequestModule_getEventList.py
...cejs_support_request/SupportRequestModule_getEventList.py
+1
-1
bt5/erp5_officejs_support_request_ui_test/TestTemplateItem/portal_components/test.erp5.testSupportRequest.py
...ateItem/portal_components/test.erp5.testSupportRequest.py
+19
-0
No files found.
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequestModule_getEventList.py
View file @
45a23b27
...
...
@@ -58,7 +58,7 @@ for brain in portal.portal_simulation.getMovementHistoryList(
'thumbnail'
:
(
# XXX this is not really a thumbnail, but it's what RSS style uses for <enclosure/>
# Also, with this `thumbnail` it will look good for image, and most of the time
# users attach a screenshot of their problem.
event
.
getDefaultAggregate
(
portal_type
=
document_type_list
)
event
.
getDefaultAggregate
(
portal_type
=
document_type_list
,
checked_permission
=
"View"
)
and
event
.
getDefaultAggregateValue
(
portal_type
=
document_type_list
).
File_getDownloadUrl
()
or
None
)
}
...
...
bt5/erp5_officejs_support_request_ui_test/TestTemplateItem/portal_components/test.erp5.testSupportRequest.py
View file @
45a23b27
...
...
@@ -548,6 +548,25 @@ class TestSupportRequestRSSSNonVisibleSupportRequest(SupportRequestRSSTestCase,
self
.
assertFalse
(
rss
.
bozo
)
class
TestSupportRequestRSSSNonVisibleAttachment
(
SupportRequestRSSTestCase
,
DefaultTestRSSMixin
):
"""Edge case test for support request RSS for an event (visible by user) with attachment not visible by user.
"""
def
afterSetUp
(
self
):
super
(
TestSupportRequestRSSSNonVisibleAttachment
,
self
).
afterSetUp
()
self
.
attached_document
.
manage_permission
(
'View'
,
[
'Manager'
],
0
)
self
.
attached_document
.
reindexObject
()
self
.
tic
()
def
_checkRSS
(
self
,
response
):
self
.
assertEqual
(
httplib
.
OK
,
response
.
getStatus
())
rss
=
feedparser
.
parse
(
response
.
getBody
())
item
,
=
rss
.
entries
# no enclosure
self
.
assertEqual
([],
[
link
for
link
in
item
[
'links'
]
if
link
[
'rel'
]
==
'enclosure'
])
# https://pythonhosted.org/feedparser/bozo.html#advanced-bozo
self
.
assertFalse
(
rss
.
bozo
)
class
TestIngestPostAsWebMessage
(
SupportRequestTestCase
):
"""Tests ingesting HTML Post into web messages.
"""
...
...
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