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
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
Alain Takoudjou
erp5
Commits
d888d27d
Commit
d888d27d
authored
Oct 09, 2018
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
officejs_support_request_ui: archive post once ingested
So that we can see if a post was ingested or not.
parent
c9f33e7e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
260 additions
and
0 deletions
+260
-0
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/Post_ingestMailMessageForSupportRequest.py
...upport_request/Post_ingestMailMessageForSupportRequest.py
+5
-0
bt5/erp5_officejs_support_request_ui_test/TestTemplateItem/portal_components/test.erp5.testSupportRequest.py
...ateItem/portal_components/test.erp5.testSupportRequest.py
+2
-0
bt5/erp5_post/WorkflowTemplateItem/portal_workflow/post_workflow/states/archived.xml
...ateItem/portal_workflow/post_workflow/states/archived.xml
+90
-0
bt5/erp5_post/WorkflowTemplateItem/portal_workflow/post_workflow/states/published.xml
...teItem/portal_workflow/post_workflow/states/published.xml
+2
-0
bt5/erp5_post/WorkflowTemplateItem/portal_workflow/post_workflow/transitions/archive.xml
...tem/portal_workflow/post_workflow/transitions/archive.xml
+81
-0
bt5/erp5_post/WorkflowTemplateItem/portal_workflow/post_workflow/transitions/archive_action.xml
...tal_workflow/post_workflow/transitions/archive_action.xml
+80
-0
No files found.
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/Post_ingestMailMessageForSupportRequest.py
View file @
d888d27d
from
Products.ERP5Type.Message
import
translateString
portal
=
context
.
getPortalObject
()
support_request
=
context
.
getFollowUpValue
()
web_site_value
=
portal
.
restrictedTraverse
(
web_site_relative_url
)
...
...
@@ -42,4 +43,8 @@ web_message = portal.event_module.newContent(
start_date
=
context
.
getCreationDate
(),
source_reference
=
context
.
getSourceReference
())
context
.
archive
(
comment
=
translateString
(
'Ingested as ${web_message_reference}'
,
mapping
=
{
'web_message_reference'
:
web_message
.
getReference
()}))
web_message
.
stop
()
bt5/erp5_officejs_support_request_ui_test/TestTemplateItem/portal_components/test.erp5.testSupportRequest.py
View file @
d888d27d
...
...
@@ -146,6 +146,8 @@ class TestSupportRequestCreateNewSupportRequest(SupportRequestTestCase):
portal_type
=
'HTML Post'
)
self
.
assertEqual
(
'<b>Help !!!</b>'
,
str
(
post
.
getData
()))
# post have been archived once ingested
self
.
assertEqual
(
'archived'
,
post
.
getValidationState
())
# the API to get comments works even after ingested
self
.
assertEqual
(
...
...
bt5/erp5_post/WorkflowTemplateItem/portal_workflow/post_workflow/states/archived.xml
0 → 100644
View file @
d888d27d
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"StateDefinition"
module=
"Products.DCWorkflow.States"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
When the post have been fully ingested, we archive it.
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
archived
</string>
</value>
</item>
<item>
<key>
<string>
permission_roles
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Archived
</string>
</value>
</item>
<item>
<key>
<string>
transitions
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
type_list
</string>
</key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
Access contents information
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
Modify portal content
</string>
</key>
<value>
<tuple>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
View
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_post/WorkflowTemplateItem/portal_workflow/post_workflow/states/published.xml
View file @
d888d27d
...
...
@@ -28,6 +28,8 @@
<key>
<string>
transitions
</string>
</key>
<value>
<tuple>
<string>
archive
</string>
<string>
archive_action
</string>
<string>
hide
</string>
<string>
hide_action
</string>
</tuple>
...
...
bt5/erp5_post/WorkflowTemplateItem/portal_workflow/post_workflow/transitions/archive.xml
0 → 100644
View file @
d888d27d
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"TransitionDefinition"
module=
"Products.DCWorkflow.Transitions"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
actbox_category
</string>
</key>
<value>
<string>
workflow
</string>
</value>
</item>
<item>
<key>
<string>
actbox_icon
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
actbox_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
actbox_url
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
after_script_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
guard
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
archive
</string>
</value>
</item>
<item>
<key>
<string>
new_state_id
</string>
</key>
<value>
<string>
archived
</string>
</value>
</item>
<item>
<key>
<string>
script_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Archive Post
</string>
</value>
</item>
<item>
<key>
<string>
trigger_type
</string>
</key>
<value>
<int>
2
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Guard"
module=
"Products.DCWorkflow.Guard"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
roles
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_post/WorkflowTemplateItem/portal_workflow/post_workflow/transitions/archive_action.xml
0 → 100644
View file @
d888d27d
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"TransitionDefinition"
module=
"Products.DCWorkflow.Transitions"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
actbox_category
</string>
</key>
<value>
<string>
workflow
</string>
</value>
</item>
<item>
<key>
<string>
actbox_icon
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
actbox_name
</string>
</key>
<value>
<string>
Archive Post
</string>
</value>
</item>
<item>
<key>
<string>
actbox_url
</string>
</key>
<value>
<string>
%(content_url)s/Base_viewWorkflowActionDialog?workflow_action=archive_action
</string>
</value>
</item>
<item>
<key>
<string>
after_script_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
guard
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
archive_action
</string>
</value>
</item>
<item>
<key>
<string>
new_state_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
script_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Archive Post (Action)
</string>
</value>
</item>
<item>
<key>
<string>
trigger_type
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Guard"
module=
"Products.DCWorkflow.Guard"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
roles
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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