Project

General

Profile

Actions

Defect #18060

closed

Selected projects in email notifications on "my account" are lost when the page is redisplayed after a validation error.

Added by Felix Schäfer about 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Category:
Email notifications
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

On "my account" with "for any event on the selected projects only" selected in the email notifications area and some projects selected for that, the selected projects (newly selected and already saved) are lost if the page gets redisplayed after for example a validation error (no first name for example).


Files

18060-coerce_ids_to_integers (1.09 KB) 18060-coerce_ids_to_integers Felix Schäfer, 2014-10-10 15:59
Actions #1

Updated by Felix Schäfer about 10 years ago

The problem is that User#notified_projects_ids= source:/trunk/app/models/user.rb@13435#L355 may receive an array of strings, for example from an update through a web form, which is stored as is. source:/trunk/app/views/users/_mail_notifications.html.erb@13435#L16 on the other hand expects an array of integers to populate the form.

The attached patch makes sure anything passed to User#notified_projects_ids= is stored as an array of integers in the instance variable.

Actions #2

Updated by Toshi MARUYAMA about 10 years ago

  • Target version set to 2.6.1
Actions #3

Updated by Jean-Philippe Lang about 10 years ago

Patch committed in r13638.

Actions #4

Updated by Jean-Philippe Lang about 10 years ago

  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed
Actions

Also available in: Atom PDF