Defect #34247
closedWeb browser freezes when displaying workflow page with a large number of issue statuses
Description
Hello,
I have a Remidne 4.1 installation with about 100 issue statuses.
When I visit workflow edit page and unset "Only display statuses that are used by this tracker" checkbox, if I press "edit" button browser hangs.
I reproduced this also with a "fresh" installation.
I attached a docker-compose file by which I created the "fresh" installation.
Once the sistem is up, I created issue statuses by following these steps:
$ docker-compose up
$ docker-compose exec redmine bash
> cd /opt/bitnami/redmine
> bundle exec rails console -e production
irb(main):001:0> (1..100).each { |i| IssueStatus.create(name: "issue status: #{i}") }
And then visit the workflow page.
Thank you.
This is my environment:
Files
Updated by Andrea Valle about 6 years ago
Updated by Andrea Valle about 6 years ago
I found the issue.
The problem is inside:
inside this function:
$(function () {
$('[title]').tooltip({
show: {
delay: 400
},
position: {
my: "center bottom-5",
at: "center top"
}
});
});
If I count the title attributes in the page with 100 issue statuses, I have 34454 items.
When I remove this code, the page loads correctly.
However I do not know the right way to fix it.
Hope this can help the fix.
Updated by Marius BĂLTEANU about 6 years ago
- Assignee set to Marius BĂLTEANU
Updated by Andrea Valle about 6 years ago
Updated by Marius BĂLTEANU almost 6 years ago
- File disable_tooltip_in_workflow_status_transition.patch disable_tooltip_in_workflow_status_transition.patch added
- Target version set to 4.1.2
The attached patch changes the tooltip selector in order to ignore elements with class no-tooltip and add this class to all cells from workflow status transitions tab.
What else we can do is to add this class only when there are more than x transitions.
Updated by Marius BĂLTEANU almost 6 years ago
- Assignee deleted (
Marius BĂLTEANU)
@Andrea Valle, can you test this solution and tell me if works for you?
Updated by Go MAEDA almost 6 years ago
Thank you for posting the patch but I found that the patch breaks an existing test.
$ ruby test/functional/workflows_controller_test.rb Run options: --seed 54329 # Running: ...F Failure: WorkflowsControllerTest#test_get_edit_should_show_checked_disabled_transition_checkbox_between_same_statuses [test/functional/workflows_controller_test.rb:125]: Expected at least 1 element matching "td[title='New » New'][class="enabled"]", found 0.. Expected 0 to be >= 1. bin/rails test test/functional/workflows_controller_test.rb:122
Applying the following patch before/after disable_tooltip_in_workflow_status_transition.patch fixes the error.
Index: test/functional/workflows_controller_test.rb
===================================================================
--- test/functional/workflows_controller_test.rb (リビジョン 20700)
+++ test/functional/workflows_controller_test.rb (作業コピー)
@@ -125,7 +125,7 @@
assert_select 'table.workflows.transitions-always tbody tr:nth-child(2)' do
assert_select 'td.name', :text => 'New'
# assert that the td is enabled
- assert_select "td[title='New » New'][class=?]", 'enabled'
+ assert_select "td.enabled[title='New » New']"
# assert that the checkbox is disabled and checked
assert_select "input[name='transitions[1][1][always]'][checked=?][disabled=?]", 'checked', 'disabled', 1
end
Updated by Go MAEDA almost 6 years ago
Marius BALTEANU wrote:
The attached patch changes the tooltip selector in order to ignore elements with class
no-tooltipand add this class to all cells from workflow status transitions tab.
I have confirmed the problem with 100 statuses. After applying the patch, Chrome finishes loading the page in 20 seconds and does not display "Page unresponsive" dialog box.
I will commit #34247#note-7 and disable_tooltip_in_workflow_status_transition.patch soon.
Updated by Go MAEDA almost 6 years ago
- Subject changed from Show Workflow for all statuses hangs with about 100 issue statuses to Web browser freezes when displaying workflow page with a large number of issue statuses
- Category changed from Issues workflow to Administration
- Status changed from New to Resolved
- Assignee set to Go MAEDA
- Resolution set to Fixed
Committed the fix. Thank you for your contribution.
Updated by Go MAEDA almost 6 years ago
- Status changed from Resolved to Closed
Updated by Go MAEDA almost 6 years ago
- Related to Patch #31441: Show elements titles using jQuery UI tooltips added
Updated by Go MAEDA over 5 years ago
- Related to Patch #35034: Improve loading speed of workflow page added