Project

General

Profile

Actions

Defect #34982

closed

Cannot change the default version and default assignee under settings

Added by Sunding Wei almost 3 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Issues
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Cannot change the default version under settings

Project -> Settings -> Issue Tracking -> Default Version

The bug found with v4.1, v4.2 and the master branch, can you verify this bug?

Thanks!


Files


Related issues

Related to Redmine - Defect #34032: Project settings tab contains two items with the same idClosedGo MAEDA

Actions
Has duplicate Redmine - Defect #35056: Can't save "Default assignee" user for project.Closed

Actions
Has duplicate Redmine - Defect #35400: The default version setting is invalidClosed

Actions
Actions #1

Updated by Bernhard Rohloff almost 3 years ago

  • Category set to Issues
  • Status changed from New to Needs feedback

I cannot reproduce the issue on my production system. Please make sure that the not shown versions are neither locked nor closed.

Actions #2

Updated by Sunding Wei almost 3 years ago

Hi Bernhard,

Thanks for your quick response, I checked out the latest 4.2-stable branch from github, the problem persists, the versions are neither closed or locked, see screenshot below

I checked the production.log, it seems no error? I cannot change the default version v0.2 to any others, logs below, you can see the default_version_id was passed to ruby, but nothing changed to the database.

Started PATCH "/projects/fund" for 192.168.5.63 at 2021-03-30 18:16:49 +0800
Processing by ProjectsController#update as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"TOKEN_REMOVED", "tab"=>"issues", "project"=>{"tracker_ids"=>["4", "1", "2", "5", "3", ""]}, "project_issue_tracking"=>{"default_version_id"=>"1", "default_assigned_to_id"=>""}, "commit"=>"Save", "id"=>"fund"}
  Current user: swei (id=5)
Redirected to http://172.16.200.203/projects/fund/settings/issues
Completed 302 Found in 25ms (ActiveRecord: 7.6ms)
Started GET "/projects/fund/settings/issues" for 192.168.5.63 at 2021-03-30 18:16:49 +0800
Processing by ProjectsController#settings as HTML
  Parameters: {"id"=>"fund", "tab"=>"issues"}
  Current user: swei (id=5)
  Rendering projects/settings.html.erb within layouts/base
  Rendered projects/_form.html.erb (15.1ms)
  Rendered projects/_edit.html.erb (16.3ms)
  Rendered projects/settings/_members.html.erb (12.0ms)
  Rendered projects/settings/_issues.html.erb (13.5ms)
  Rendered projects/settings/_versions.html.erb (8.6ms)
  Rendered projects/settings/_issue_categories.html.erb (2.8ms)
  Rendered projects/settings/_repositories.html.erb (6.4ms)
  Rendered projects/settings/_activities.html.erb (11.2ms)
  Rendered common/_tabs.html.erb (74.3ms)
  Rendered projects/settings.html.erb within layouts/base (76.3ms)
Completed 200 OK in 117ms (Views: 74.5ms | ActiveRecord: 31.5ms)
Started PATCH "/projects/fund" for 192.168.5.63 at 2021-03-30 18:17:40 +0800
Processing by ProjectsController#update as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"TOKEN_REMOVED", "tab"=>"issues", "project"=>{"tracker_ids"=>["4", "1", "2", "5", "3", ""]}, "project_issue_tracking"=>{"default_version_id"=>"8", "default_assigned_to_id"=>""}, "commit"=>"Save", "id"=>"fund"}
  Current user: swei (id=5)
Redirected to http://172.16.200.203/projects/fund/settings/issues
Completed 302 Found in 38ms (ActiveRecord: 11.8ms)
Started GET "/projects/fund/settings/issues" for 192.168.5.63 at 2021-03-30 18:17:40 +0800
Processing by ProjectsController#settings as HTML
  Parameters: {"id"=>"fund", "tab"=>"issues"}
  Current user: swei (id=5)
  Rendering projects/settings.html.erb within layouts/base
  Rendered projects/_form.html.erb (18.7ms)
  Rendered projects/_edit.html.erb (20.5ms)
  Rendered projects/settings/_members.html.erb (15.1ms)
  Rendered projects/settings/_issues.html.erb (11.6ms)
  Rendered projects/settings/_versions.html.erb (8.5ms)
  Rendered projects/settings/_issue_categories.html.erb (3.0ms)
  Rendered projects/settings/_repositories.html.erb (8.0ms)
  Rendered projects/settings/_activities.html.erb (13.2ms)
  Rendered common/_tabs.html.erb (85.5ms)
  Rendered projects/settings.html.erb within layouts/base (88.4ms)
Completed 200 OK in 129ms (Views: 93.1ms | ActiveRecord: 24.9ms)
Actions #3

Updated by Bernhard Rohloff almost 3 years ago

  • Status changed from Needs feedback to Confirmed

Yes, you are right. I've tested it again.
The issue is not that the versions are not shown but that it flips back to its prior value if you click the save button.

Actions #4

Updated by Bernhard Rohloff almost 3 years ago

The issue is caused by r20766 which was done for #34032. The form parameter (project_issue_tracking) was changed without processing it in the controller.
The other values for custom fields and trackers are set correctly as the name of their input fields is hard coded in this view.

Started PATCH "/projects/ecookbook" for 127.0.0.1 at 2021-03-30 16:15:05 +0200
Processing by ProjectsController#update as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"rLc3tuqdXLulwVWSOqG0OhFdFyMT13ycZWYXRpWU2ggMIjQT1sN5KdG3eGp21rx81_LtHLSBg2Z46tSgEm2E9g", "tab"=>"issues", "project"=>{"tracker_ids"=>["1", "2", "3", ""], "issue
_custom_field_ids"=>["9", ""]}, "project_issue_tracking"=>{"default_version_id"=>"3", "default_assigned_to_id"=>"3"}, "commit"=>"Save", "id"=>"ecookbook"}

At the moment I don't know what's the best way to fix it. Reverting the patch or modifying the controller to additionally save the values of the second parameter. The last seems to be the cleaner option to me.

@GoMAEDA, @MariusBALTEANU I posted this comment accidentially in #34988.

Actions #5

Updated by Marius BĂLTEANU almost 3 years ago

  • Assignee set to Marius BĂLTEANU
  • Target version set to 4.2.1
Actions #6

Updated by Marius BĂLTEANU almost 3 years ago

  • Related to Defect #34032: Project settings tab contains two items with the same id added
Actions #8

Updated by Marius BĂLTEANU almost 3 years ago

I've attached a fix with tests included.

Actions #9

Updated by Sunding Wei almost 3 years ago

The patch verified and the defect was FIXED, thanks for your guys quick & selfless contributions!

Actions #10

Updated by Bernhard Rohloff almost 3 years ago

I've checked/tested the patch, too. I can confirm that it fixes the issue.

Actions #11

Updated by Marius BĂLTEANU almost 3 years ago

  • Assignee changed from Marius BĂLTEANU to Go MAEDA
Actions #12

Updated by Go MAEDA almost 3 years ago

  • Status changed from Confirmed to Resolved
  • Resolution set to Fixed

Committed the fix. Thank you.

Actions #13

Updated by Go MAEDA almost 3 years ago

  • Status changed from Resolved to Closed
Actions #14

Updated by Marius BĂLTEANU almost 3 years ago

  • Subject changed from Cannot change the default version under settings to Cannot change the default version and assignee under settings
Actions #15

Updated by Marius BĂLTEANU almost 3 years ago

  • Subject changed from Cannot change the default version and assignee under settings to Cannot change the default version and default assignee under settings
Actions #16

Updated by Marius BĂLTEANU almost 3 years ago

  • Has duplicate Defect #35056: Can't save "Default assignee" user for project. added
Actions #17

Updated by Go MAEDA over 2 years ago

  • Has duplicate Defect #35400: The default version setting is invalid added
Actions #18

Updated by Dominik P over 1 year ago

We're working with v4.2.1 and have a similar problem with "default assignee"

Does someone else got this problem? Is it solved in actual version?

Actions

Also available in: Atom PDF