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
fe72223d
Commit
fe72223d
authored
Oct 13, 2020
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_project: update related milestone for task
parent
3a585f52
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
441 additions
and
1 deletion
+441
-1
bt5/erp5_project/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
...rtalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
+1
-1
bt5/erp5_project/TestTemplateItem/portal_components/test.erp5.testProject.py
...stTemplateItem/portal_components/test.erp5.testProject.py
+54
-0
bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_interaction_workflow.xml
...emplateItem/portal_workflow/task_interaction_workflow.xml
+46
-0
bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_interaction_workflow/interactions.xml
...ortal_workflow/task_interaction_workflow/interactions.xml
+28
-0
bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_interaction_workflow/interactions/update_source_milestone.xml
...raction_workflow/interactions/update_source_milestone.xml
+104
-0
bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_interaction_workflow/scripts.xml
...tem/portal_workflow/task_interaction_workflow/scripts.xml
+28
-0
bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_interaction_workflow/scripts/Task_removeForOldMilestone.py
...nteraction_workflow/scripts/Task_removeForOldMilestone.py
+5
-0
bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_interaction_workflow/scripts/Task_removeForOldMilestone.xml
...teraction_workflow/scripts/Task_removeForOldMilestone.xml
+62
-0
bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_interaction_workflow/scripts/Task_updateMilestone.py
...task_interaction_workflow/scripts/Task_updateMilestone.py
+5
-0
bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_interaction_workflow/scripts/Task_updateMilestone.xml
...ask_interaction_workflow/scripts/Task_updateMilestone.xml
+62
-0
bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_interaction_workflow/variables.xml
...m/portal_workflow/task_interaction_workflow/variables.xml
+22
-0
bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_interaction_workflow/worklists.xml
...m/portal_workflow/task_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
+1
-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 @
fe72223d
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
</chain>
</chain>
<chain>
<chain>
<type>
Task
</type>
<type>
Task
</type>
<workflow>
delivery_causality_interaction_workflow, delivery_causality_workflow, delivery_simulation_interaction_workflow, edit_workflow, task_workflow
</workflow>
<workflow>
delivery_causality_interaction_workflow, delivery_causality_workflow, delivery_simulation_interaction_workflow, edit_workflow, task_
interaction_workflow, task_
workflow
</workflow>
</chain>
</chain>
<chain>
<chain>
<type>
Task Line
</type>
<type>
Task Line
</type>
...
...
bt5/erp5_project/TestTemplateItem/portal_components/test.erp5.testProject.py
View file @
fe72223d
...
@@ -305,6 +305,60 @@ class TestProject(ERP5TypeTestCase):
...
@@ -305,6 +305,60 @@ 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
testTaskUpdateProjectMilestone
(
self
):
# Create Tasks
task_module
=
self
.
getPortalObject
().
task_module
project
=
self
.
getPortalObject
().
project_module
.
Project_3
if
not
project
.
has_key
(
'project_milestone_task_milestone_1'
):
project
.
newContent
(
portal_type
=
'Project Milestone'
,
id
=
'project_milestone_task_milestone_1'
)
if
not
project
.
has_key
(
'project_milestone_task_milestone_2'
):
project
.
newContent
(
portal_type
=
'Project Milestone'
,
id
=
'project_milestone_task_milestone_2'
)
task_list
=
[]
if
not
project
.
project_milestone_task_milestone_1
.
getPredecessorValueList
():
for
_
in
range
(
2
):
task_list
.
append
(
task_module
.
newContent
(
portal_type
=
'Task'
,
title
=
'Task'
,
specialise
=
self
.
business_process
,
task_line_quantity
=
3
,
source_project
=
'project_module/Project_3'
,
resource
=
'product_module/enterprise_support'
,
task_line_quantity_unit
=
'time/day'
,
source
=
'organisation_module/Organisation_1'
,
source_section
=
'organisation_module/Organisation_1'
,
destination
=
'organisation_module/Organisation_2'
,
destination_section
=
'organisation_module/Organisation_2'
))
project
.
project_milestone_task_milestone_1
.
edit
(
predecessor_value_list
=
task_list
)
self
.
tic
()
task
=
task_module
.
newContent
(
portal_type
=
'Task'
,
title
=
'Task'
,
specialise
=
self
.
business_process
,
task_line_quantity
=
3
,
resource
=
'product_module/enterprise_support'
,
task_line_quantity_unit
=
'time/day'
,
source
=
'organisation_module/Organisation_1'
,
source_section
=
'organisation_module/Organisation_1'
,
destination
=
'organisation_module/Organisation_2'
,
destination_section
=
'organisation_module/Organisation_2'
)
task
.
edit
(
source_milestone_value
=
project
.
project_milestone_task_milestone_1
)
self
.
tic
()
predecessor_value_list
=
project
.
project_milestone_task_milestone_1
.
getPredecessorValueList
()
self
.
assertEqual
(
len
(
predecessor_value_list
),
3
)
self
.
assertTrue
(
task
in
predecessor_value_list
)
task_milestone_2_length
=
len
(
project
.
project_milestone_task_milestone_2
.
getPredecessorValueList
())
task
.
edit
(
source_milestone_value
=
project
.
project_milestone_task_milestone_2
)
self
.
tic
()
predecessor_value_list
=
project
.
project_milestone_task_milestone_1
.
getPredecessorValueList
()
self
.
assertEqual
(
len
(
predecessor_value_list
),
2
)
self
.
assertTrue
(
task
not
in
predecessor_value_list
)
predecessor_value_list
=
project
.
project_milestone_task_milestone_2
.
getPredecessorValueList
()
self
.
assertEqual
(
len
(
predecessor_value_list
),
task_milestone_2_length
+
1
)
self
.
assertTrue
(
task
in
predecessor_value_list
)
def
test_suite
():
def
test_suite
():
suite
=
unittest
.
TestSuite
()
suite
=
unittest
.
TestSuite
()
suite
.
addTest
(
unittest
.
makeSuite
(
TestProject
))
suite
.
addTest
(
unittest
.
makeSuite
(
TestProject
))
...
...
bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_interaction_workflow.xml
0 → 100644
View file @
fe72223d
<?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>
task_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>
Task Interaction Workflow
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_interaction_workflow/interactions.xml
0 → 100644
View file @
fe72223d
<?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/task_interaction_workflow/interactions/update_source_milestone.xml
0 → 100644
View file @
fe72223d
<?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>
Task_updateMilestone
</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
</string>
</value>
</item>
<item>
<key>
<string>
method_id
</string>
</key>
<value>
<list>
<string>
_setSourceMilestone.*
</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>
Task
</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>
<list>
<string>
Task_removeForOldMilestone
</string>
</list>
</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/task_interaction_workflow/scripts.xml
0 → 100644
View file @
fe72223d
<?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/task_interaction_workflow/scripts/Task_removeForOldMilestone.py
0 → 100644
View file @
fe72223d
task
=
state_change
[
'object'
]
milestone
=
task
.
getSourceMilestoneValue
()
if
milestone
:
new_value_list
=
[
x
for
x
in
milestone
.
getPredecessorValueList
()
if
x
!=
task
]
milestone
.
edit
(
predecessor_value_list
=
new_value_list
)
bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_interaction_workflow/scripts/Task_removeForOldMilestone.xml
0 → 100644
View file @
fe72223d
<?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>
Task_removeForOldMilestone
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_interaction_workflow/scripts/Task_updateMilestone.py
0 → 100644
View file @
fe72223d
task
=
state_change
[
'object'
]
milestone
=
task
.
getSourceMilestoneValue
()
if
milestone
:
new_value_list
=
[
x
for
x
in
milestone
.
getPredecessorValueList
()
if
x
!=
task
]
+
[
task
]
milestone
.
edit
(
predecessor_value_list
=
new_value_list
)
bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_interaction_workflow/scripts/Task_updateMilestone.xml
0 → 100644
View file @
fe72223d
<?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>
Task_updateMilestone
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_interaction_workflow/variables.xml
0 → 100644
View file @
fe72223d
<?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/task_interaction_workflow/worklists.xml
0 → 100644
View file @
fe72223d
<?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 @
fe72223d
...
@@ -20,4 +20,5 @@ Task | delivery_causality_interaction_workflow
...
@@ -20,4 +20,5 @@ Task | delivery_causality_interaction_workflow
Task | delivery_causality_workflow
Task | delivery_causality_workflow
Task | delivery_simulation_interaction_workflow
Task | delivery_simulation_interaction_workflow
Task | edit_workflow
Task | edit_workflow
Task | task_interaction_workflow
Task | task_workflow
Task | task_workflow
\ No newline at end of file
bt5/erp5_project/bt/template_workflow_id_list
View file @
fe72223d
project_workflow
project_workflow
requirement_analysis_workflow
requirement_analysis_workflow
task_interaction_workflow
task_report_workflow
task_report_workflow
task_workflow
task_workflow
\ No newline at end of file
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