Project

General

Profile

Actions

Patch #2971

closed

Patch for "My Page" personalization not storing reordered blocks

Added by Anonymous about 15 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Normal
Category:
UI
Target version:
Start date:
2009-03-14
Due date:
% Done:

0%

Estimated time:

Description

I just noticed "My page" personalization does not fully work:
You can add/remove blocks, but after reordering blocks the layout is not stored.
Tested with Safari 3.2.1 and FireFox 3.0.1, this can be reproduced on http://www.redmine.org.

One reason is MyController#order_blocks expects params[:group] to be an array, which simply is not the case, also params["list-#{group}"] may actually be empty if the user just dragged the last item out of a group.

A patch for these issues is attached.

Note that there may still be a race condition because of concurrent AJAX calls when the session is stored within cookies.
(Basically the same session is received twice - once for the removal, once for adding - changed and sent back, one change overwriting the other)

Redmine trunk (r2589)
Ruby 1.8.6
Rails 2.2.2
Postgres 8.3


Files

mypage_order_fix.patch (704 Bytes) mypage_order_fix.patch Anonymous, 2009-03-14 23:53
Actions

Also available in: Atom PDF