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
546b7bcc
Commit
546b7bcc
authored
Sep 30, 2020
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_forge: possible to create new task if previous one is finished
parent
11e7bbfe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_forge/Bug_newTask.py
...e/SkinTemplateItem/portal_skins/erp5_forge/Bug_newTask.py
+10
-7
No files found.
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_forge/Bug_newTask.py
View file @
546b7bcc
task
=
context
.
getFollowUpRelatedValue
(
portal_type
=
'Task'
)
if
not
task
:
task
=
context
.
task_module
.
newContent
(
if
task
:
task_report
=
task
.
getCausalityRelatedValue
(
portal_type
=
'Task Report'
)
if
task_report
is
None
or
task_report
.
getSimulationState
()
not
in
(
'delivered'
):
message
=
context
.
Base_translateString
(
"A task is already created for this bug"
)
return
task
.
Base_redirect
(
'view'
,
keep_items
=
{
'portal_status_message'
:
message
})
task
=
context
.
task_module
.
newContent
(
portal_type
=
'Task'
,
start_date
=
start_date
,
stop_date
=
stop_date
,
...
...
@@ -12,8 +18,5 @@ if not task:
source_project
=
context
.
getSourceProject
(),
#project
follow_up_value
=
context
)
message
=
context
.
Base_translateString
(
"A new task is created for this bug"
)
return
task
.
Base_redirect
(
'view'
,
keep_items
=
{
'portal_status_message'
:
message
})
else
:
message
=
context
.
Base_translateString
(
"A task is already created for this bug"
)
return
task
.
Base_redirect
(
'view'
,
keep_items
=
{
'portal_status_message'
:
message
})
message
=
context
.
Base_translateString
(
"A new task is created for this bug"
)
return
task
.
Base_redirect
(
'view'
,
keep_items
=
{
'portal_status_message'
:
message
})
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