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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xiaowu Zhang
erp5
Commits
75d9d71d
Commit
75d9d71d
authored
Oct 14, 2020
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_project: update milestone update also task
parent
04094226
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
340 additions
and
1 deletion
+340
-1
bt5/erp5_project/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
...rtalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
+4
-0
bt5/erp5_project/TestTemplateItem/portal_components/test.erp5.testProject.py
...stTemplateItem/portal_components/test.erp5.testProject.py
+12
-1
bt5/erp5_project/WorkflowTemplateItem/portal_workflow/milestone_interaction_workflow.xml
...teItem/portal_workflow/milestone_interaction_workflow.xml
+46
-0
bt5/erp5_project/WorkflowTemplateItem/portal_workflow/milestone_interaction_workflow/interactions.xml
..._workflow/milestone_interaction_workflow/interactions.xml
+28
-0
bt5/erp5_project/WorkflowTemplateItem/portal_workflow/milestone_interaction_workflow/interactions/update_source_milestone_related_task.xml
...low/interactions/update_source_milestone_related_task.xml
+102
-0
bt5/erp5_project/WorkflowTemplateItem/portal_workflow/milestone_interaction_workflow/scripts.xml
...ortal_workflow/milestone_interaction_workflow/scripts.xml
+28
-0
bt5/erp5_project/WorkflowTemplateItem/portal_workflow/milestone_interaction_workflow/scripts/ProjectMilestone_updateTask.py
...teraction_workflow/scripts/ProjectMilestone_updateTask.py
+11
-0
bt5/erp5_project/WorkflowTemplateItem/portal_workflow/milestone_interaction_workflow/scripts/ProjectMilestone_updateTask.xml
...eraction_workflow/scripts/ProjectMilestone_updateTask.xml
+62
-0
bt5/erp5_project/WorkflowTemplateItem/portal_workflow/milestone_interaction_workflow/variables.xml
...tal_workflow/milestone_interaction_workflow/variables.xml
+22
-0
bt5/erp5_project/WorkflowTemplateItem/portal_workflow/milestone_interaction_workflow/worklists.xml
...tal_workflow/milestone_interaction_workflow/worklists.xml
+22
-0
bt5/erp5_project/bt/template_portal_type_workflow_chain_list
bt5/erp5_project/bt/template_portal_type_workflow_chain_list
+2
-0
bt5/erp5_project/bt/template_workflow_id_list
bt5/erp5_project/bt/template_workflow_id_list
+1
-0
No files found.
bt5/erp5_project/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
View file @
75d9d71d
...
@@ -7,6 +7,10 @@
...
@@ -7,6 +7,10 @@
<type>
Project Line
</type>
<type>
Project Line
</type>
<workflow>
edit_workflow
</workflow>
<workflow>
edit_workflow
</workflow>
</chain>
</chain>
<chain>
<type>
Project Milestone
</type>
<workflow>
edit_workflow, milestone_interaction_workflow
</workflow>
</chain>
<chain>
<chain>
<type>
Requirement
</type>
<type>
Requirement
</type>
<workflow>
edit_workflow, requirement_analysis_workflow
</workflow>
<workflow>
edit_workflow, requirement_analysis_workflow
</workflow>
...
...
bt5/erp5_project/TestTemplateItem/portal_components/test.erp5.testProject.py
View file @
75d9d71d
...
@@ -305,7 +305,7 @@ class TestProject(ERP5TypeTestCase):
...
@@ -305,7 +305,7 @@ class TestProject(ERP5TypeTestCase):
self
.
assertEqual
(
project
.
project_milestone_1
.
getQuantityUnit
(),
'time/day'
)
self
.
assertEqual
(
project
.
project_milestone_1
.
getQuantityUnit
(),
'time/day'
)
self
.
tic
()
self
.
tic
()
def
test
TaskUpdateProjectMilestone
(
self
):
def
test
_UpdateProjectMilestone_task
(
self
):
# Create Tasks
# Create Tasks
task_module
=
self
.
getPortalObject
().
task_module
task_module
=
self
.
getPortalObject
().
task_module
project
=
self
.
getPortalObject
().
project_module
.
Project_3
project
=
self
.
getPortalObject
().
project_module
.
Project_3
...
@@ -358,6 +358,17 @@ class TestProject(ERP5TypeTestCase):
...
@@ -358,6 +358,17 @@ class TestProject(ERP5TypeTestCase):
predecessor_value_list
=
project
.
project_milestone_task_milestone_2
.
getPredecessorValueList
()
predecessor_value_list
=
project
.
project_milestone_task_milestone_2
.
getPredecessorValueList
()
self
.
assertEqual
(
len
(
predecessor_value_list
),
task_milestone_2_length
+
1
)
self
.
assertEqual
(
len
(
predecessor_value_list
),
task_milestone_2_length
+
1
)
self
.
assertTrue
(
task
in
predecessor_value_list
)
self
.
assertTrue
(
task
in
predecessor_value_list
)
project
.
project_milestone_task_milestone_2
.
setPredecessorValueList
([
x
for
x
in
project
.
project_milestone_task_milestone_2
.
getPredecessorValueList
()
if
x
!=
task
])
self
.
tic
()
self
.
assertEqual
(
task
.
getSourceMilestoneValue
(),
None
)
self
.
assertEqual
(
len
(
project
.
project_milestone_task_milestone_2
.
getPredecessorValueList
()),
task_milestone_2_length
)
self
.
assertTrue
(
task
not
in
project
.
project_milestone_task_milestone_2
.
getPredecessorValueList
())
project
.
project_milestone_task_milestone_2
.
setPredecessorValueList
(
project
.
project_milestone_task_milestone_2
.
getPredecessorValueList
()
+
[
task
])
self
.
tic
()
self
.
assertEqual
(
task
.
getSourceMilestoneValue
(),
project
.
project_milestone_task_milestone_2
)
self
.
assertEqual
(
len
(
project
.
project_milestone_task_milestone_2
.
getPredecessorValueList
()),
task_milestone_2_length
+
1
)
self
.
assertTrue
(
task
in
project
.
project_milestone_task_milestone_2
.
getPredecessorValueList
())
def
test_suite
():
def
test_suite
():
suite
=
unittest
.
TestSuite
()
suite
=
unittest
.
TestSuite
()
...
...
bt5/erp5_project/WorkflowTemplateItem/portal_workflow/milestone_interaction_workflow.xml
0 → 100644
View file @
75d9d71d
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"InteractionWorkflowDefinition"
module=
"Products.ERP5.InteractionWorkflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
creation_guard
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
groups
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
milestone_interaction_workflow
</string>
</value>
</item>
<item>
<key>
<string>
manager_bypass
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Milestone Interaction Workflow
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_project/WorkflowTemplateItem/portal_workflow/milestone_interaction_workflow/interactions.xml
0 → 100644
View file @
75d9d71d
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Interaction"
module=
"Products.ERP5.Interaction"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_mapping
</string>
</key>
<value>
<dictionary/>
</value>
</item>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
interactions
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_project/WorkflowTemplateItem/portal_workflow/milestone_interaction_workflow/interactions/update_source_milestone_related_task.xml
0 → 100644
View file @
75d9d71d
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"InteractionDefinition"
module=
"Products.ERP5.Interaction"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
actbox_category
</string>
</key>
<value>
<string>
workflow
</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>
activate_script_name
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
after_script_name
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
before_commit_script_name
</string>
</key>
<value>
<list>
<string>
ProjectMilestone_updateTask
</string>
</list>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
guard
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
update_source_milestone_related_task
</string>
</value>
</item>
<item>
<key>
<string>
method_id
</string>
</key>
<value>
<list>
<string>
_setPredecessor.*
</string>
</list>
</value>
</item>
<item>
<key>
<string>
once_per_transaction
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
portal_type_filter
</string>
</key>
<value>
<list>
<string>
Project Milestone
</string>
</list>
</value>
</item>
<item>
<key>
<string>
portal_type_group_filter
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
script_name
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
temporary_document_disallowed
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
trigger_type
</string>
</key>
<value>
<int>
2
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_project/WorkflowTemplateItem/portal_workflow/milestone_interaction_workflow/scripts.xml
0 → 100644
View file @
75d9d71d
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Scripts"
module=
"Products.DCWorkflow.Scripts"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_mapping
</string>
</key>
<value>
<dictionary/>
</value>
</item>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
scripts
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_project/WorkflowTemplateItem/portal_workflow/milestone_interaction_workflow/scripts/ProjectMilestone_updateTask.py
0 → 100644
View file @
75d9d71d
milestone
=
state_change
[
'object'
]
old_task_list
=
milestone
.
getSourceMilestoneRelatedValueList
(
portal_type
=
'Task'
)
new_task_list
=
milestone
.
getPredecessorValueList
(
portal_type
=
'Task'
)
for
task
in
old_task_list
:
if
task
not
in
new_task_list
and
task
.
getSourceMilestoneValue
()
==
milestone
:
task
.
setSourceMilestoneValue
(
None
)
for
task
in
new_task_list
:
if
task
not
in
old_task_list
and
task
.
getSourceMilestoneValue
()
!=
milestone
:
task
.
setSourceMilestoneValue
(
milestone
)
bt5/erp5_project/WorkflowTemplateItem/portal_workflow/milestone_interaction_workflow/scripts/ProjectMilestone_updateTask.xml
0 → 100644
View file @
75d9d71d
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
state_change
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ProjectMilestone_updateTask
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_project/WorkflowTemplateItem/portal_workflow/milestone_interaction_workflow/variables.xml
0 → 100644
View file @
75d9d71d
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Variables"
module=
"Products.DCWorkflow.Variables"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_mapping
</string>
</key>
<value>
<dictionary/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
variables
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_project/WorkflowTemplateItem/portal_workflow/milestone_interaction_workflow/worklists.xml
0 → 100644
View file @
75d9d71d
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Worklists"
module=
"Products.DCWorkflow.Worklists"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_mapping
</string>
</key>
<value>
<dictionary/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
worklists
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_project/bt/template_portal_type_workflow_chain_list
View file @
75d9d71d
Project Line | edit_workflow
Project Line | edit_workflow
Project Milestone | edit_workflow
Project Milestone | milestone_interaction_workflow
Project | edit_workflow
Project | edit_workflow
Project | project_workflow
Project | project_workflow
Requirement Document | edit_workflow
Requirement Document | edit_workflow
...
...
bt5/erp5_project/bt/template_workflow_id_list
View file @
75d9d71d
milestone_interaction_workflow
project_workflow
project_workflow
requirement_analysis_workflow
requirement_analysis_workflow
task_interaction_workflow
task_interaction_workflow
...
...
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