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
1
Merge Requests
1
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
Boxiang Sun
erp5
Commits
86985db3
Commit
86985db3
authored
Apr 28, 2021
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Workflow: Fix erp5_web_renderjs_ui_test:testFunctionalRJSCore failure.
parent
01fd0f88
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
29 deletions
+30
-29
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/testMassWorkflowTransition.zpt
...al_tests/renderjs_ui_zuite/testMassWorkflowTransition.zpt
+8
-8
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Module_listWorkflowTransitionItemList.py
..._skins/erp5_core/Module_listWorkflowTransitionItemList.py
+22
-21
No files found.
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/testMassWorkflowTransition.zpt
View file @
86985db3
...
...
@@ -57,9 +57,9 @@
<tr><td>
waitForElementPresent
</td>
<td>
//select[@name="field_your_mass_workflow_action"]/option
</td><td></td></tr>
<tr><td>
assertElementPresent
</td>
<td>
//select[@name="field_your_mass_workflow_action"]/option[@value="
transition_
validate_action"]
</td><td></td></tr>
<td>
//select[@name="field_your_mass_workflow_action"]/option[@value="validate_action"]
</td><td></td></tr>
<tr><td>
assertElementPresent
</td>
<td>
//select[@name="field_your_mass_workflow_action"]/option[@value="
transition_
invalidate_action"]
</td><td></td></tr>
<td>
//select[@name="field_your_mass_workflow_action"]/option[@value="invalidate_action"]
</td><td></td></tr>
<tr><th
colspan=
"3"
>
Search
<em>
( title: "Title 1%" OR title: "Title 3%" )
</em>
so we work on subset
</th></tr>
<tr><td>
click
</td>
...
...
@@ -77,10 +77,10 @@
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tr><td>
waitForElementPresent
</td>
<td>
//select[@name="field_your_mass_workflow_action"]/option[@value="
transition_
validate_action"]
</td><td></td></tr>
<td>
//select[@name="field_your_mass_workflow_action"]/option[@value="validate_action"]
</td><td></td></tr>
<tr><td>
select
</td>
<td>
//select[@name="field_your_mass_workflow_action"]
</td>
<td>
value=
transition_
validate_action
</td></tr>
<td>
value=validate_action
</td></tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tal:block
tal:define=
"notification_configuration python: {'class': 'error', 'text': 'Form updated.'}"
>
...
...
@@ -157,10 +157,10 @@
<tr><td>
waitForElementPresent
</td>
<td>
//select[@name="field_your_mass_workflow_action"]/option[@value="
transition_
invalidate_action"]
</td><td></td></tr>
<td>
//select[@name="field_your_mass_workflow_action"]/option[@value="invalidate_action"]
</td><td></td></tr>
<tr><td>
select
</td>
<td>
//select[@name="field_your_mass_workflow_action"]
</td>
<td>
value=
transition_
invalidate_action
</td></tr>
<td>
value=invalidate_action
</td></tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog"
/>
<tal:block
tal:define=
"notification_configuration python: {'class': 'error', 'text': 'Form updated.'}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification"
/>
...
...
@@ -175,10 +175,10 @@
<tr><td>
waitForElementPresent
</td>
<td>
//select[@name="field_your_mass_workflow_action"]/option[@value="
transition_
validate_action"]
</td><td></td></tr>
<td>
//select[@name="field_your_mass_workflow_action"]/option[@value="validate_action"]
</td><td></td></tr>
<tr><td>
select
</td>
<td>
//select[@name="field_your_mass_workflow_action"]
</td>
<td>
value=
transition_
validate_action
</td></tr>
<td>
value=validate_action
</td></tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog"
/>
<tal:block
tal:define=
"notification_configuration python: {'class': 'error', 'text': 'Form updated.'}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification"
/>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Module_listWorkflowTransitionItemList.py
View file @
86985db3
...
...
@@ -21,37 +21,38 @@ checked_workflow_id_dict = {}
for
document_portal_type_id
in
module_portal_type
.
getTypeAllowedContentTypeList
():
if
(
filter_portal_type_list
is
not
None
)
and
(
document_portal_type_id
not
in
filter_portal_type_list
):
continue
for
workflow
in
workflow_tool
.
getWorkflowsFor
(
document_portal_type_id
):
if
workflow
.
id
not
in
checked_workflow_id_dict
:
for
workflow
in
workflow_tool
.
getWorkflowValueListFor
(
document_portal_type_id
):
workflow_id
=
workflow
.
getId
()
if
workflow_id
not
in
checked_workflow_id_dict
:
# Do not check the same workflow twice
checked_workflow_id_dict
[
workflow
.
id
]
=
None
checked_workflow_id_dict
[
workflow
_
id
]
=
None
state_variable
=
workflow
.
state_var
state_variable
=
workflow
.
getStateVariable
()
allowed_state_dict
=
{}
if
getattr
(
workflow
,
'states'
,
None
)
is
not
None
:
for
state_id
,
state
in
workflow
.
states
.
items
():
for
possible_transition_id
in
state
.
transitions
:
if
possible_transition_id
in
allowed_state_dict
:
allowed_state_dict
[
possible_transition_id
].
append
(
state_id
)
state_value_list
=
workflow
.
getStateValueList
()
if
state_value_list
:
for
state
in
state_value_list
:
state_reference
=
state
.
getReference
()
for
possible_transition
in
state
.
getDestinationValueList
():
if
possible_transition
in
allowed_state_dict
:
allowed_state_dict
[
possible_transition
].
append
(
state_reference
)
else
:
allowed_state_dict
[
possible_transition_id
]
=
[
state_id
]
for
transition_id
in
allowed_state_dict
:
transition
=
workflow
.
transitions
.
get
(
transition_id
,
None
)
if
transition
is
None
:
continue
allowed_state_dict
[
possible_transition
]
=
[
state_reference
]
for
transition
in
allowed_state_dict
:
transition_reference
=
transition
.
getReference
()
# Only display user action transition with a dialog to show to user
if
(
transition
.
trigger_type
==
TRIGGER_USER_ACTION
)
and
(
transition
.
actbox_url
)
and
(
transition
.
actbox_name
):
action_form_id
=
transition
.
actbox_url
.
rsplit
(
'/'
,
1
)[
1
].
split
(
'?'
)[
0
]
if
transition
.
getTriggerType
()
==
TRIGGER_USER_ACTION
and
transition
.
getAction
()
and
transition
.
getActionName
(
):
action_form_id
=
transition
.
getAction
()
.
rsplit
(
'/'
,
1
)[
1
].
split
(
'?'
)[
0
]
result
[
'transition_item_list'
].
append
((
translate
(
transition
.
actbox_name
),
transition_id
))
result
[
'form_id_dict'
][
transition_
id
]
=
action_form_id
result
[
'transition_item_list'
].
append
((
translate
(
transition
.
getActionName
()),
transition_reference
))
result
[
'form_id_dict'
][
transition_
reference
]
=
action_form_id
# XXX portal_type parameter must also probably be added too
# This would required to detect identical transition id for different workflow
result
[
'listbox_parameter_dict'
][
transition_
id
]
=
[(
state_variable
,
allowed_state_dict
[
transition_id
])]
elif
(
transition
.
trigger_type
==
TRIGGER_USER_ACTION
)
and
(
transition_id
==
'delete_action'
)
:
result
[
'listbox_parameter_dict'
][
transition_
id
]
=
[(
state_variable
,
allowed_state_dict
[
transition_id
])]
result
[
'listbox_parameter_dict'
][
transition_
reference
]
=
[(
state_variable
,
allowed_state_dict
[
transition
])]
elif
transition
.
getTriggerType
()
==
TRIGGER_USER_ACTION
and
transition_reference
==
'delete_action'
:
result
[
'listbox_parameter_dict'
][
transition_
reference
]
=
[(
state_variable
,
allowed_state_dict
[
transition
])]
result
[
'transition_item_list'
].
sort
()
result
[
'transition_item_list'
].
insert
(
0
,
(
''
,
''
))
...
...
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