Defect #23410

Error if create new issue and there is no project

Added by Quan VN about 6 years ago. Updated 9 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:


Target version:3.3.1
Resolution:Fixed Affected version:3.3.0


The error occurs in this case
1. install new redmine and there is no project.
2. From top menu, click Project
3. From this project index page, click View All Issue
4. From that issue index page, click on New Issue
Then the error 500 occurs with the following logs

Started GET "/redmine/issues/new" for at 2016-07-23 07:41:55 +0000
Processing by IssuesController#new as HTML
Current user: admin (id=1)
Rendered issues/_attributes.html.erb (7.5ms)
Rendered issues/_form.html.erb (26.4ms)
Rendered issues/new.html.erb within layouts/base (28.5ms)
Completed 500 Internal Server Error in 100ms (ActiveRecord: 34.2ms)

ActionView::Template::Error (undefined method `assignable_users' for nil:NilClass):
15: <% end >
17: <
if @issue.safe_attribute? 'assigned_to_id' >
18: <p><
= :assigned_to_id, principals_options_for_select(@issue.assignable_users, @issue.assigned_to), :include_blank => true, :required => @issue.required_attribute?('assigned_to_id') ></p>
19: <
end >
21: <
if @issue.safe_attribute?('category_id') && @issue.project.issue_categories.any? %>
app/models/issue.rb:857:in `assignable_users'
app/views/issues/_attributes.html.erb:18:in `block in app_views_issues_attributes_html_erb___3587757851355343547_69925371132800'
app/helpers/application_helper.rb:1058:in `labelled_fields_for'
app/views/issues/_attributes.html.erb:1:in `_app_views_issues__attributes_html_erb___3587757851355343547_69925371132800'
app/views/issues/_form.html.erb:42:in `block in app_views_issues_form_html_erb___3675110379538404660_69925371413960'
app/helpers/application_helper.rb:1058:in `labelled_fields_for'
app/views/issues/_form.html.erb:1:in `_app_views_issues__form_html_erb___3675110379538404660_69925371413960'
app/views/issues/new.html.erb:11:in `block in app_views_issues_new_html_erb_153899361600342295_69925371381020'
app/helpers/application_helper.rb:1051:in `labelled_form_for'
app/views/issues/new.html.erb:5:in `_app_views_issues_new_html_erb__153899361600342295_69925371381020'
app/controllers/issues_controller.rb:129:in `block (2 levels) in new'
app/controllers/issues_controller.rb:128:in `new'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'

Related issues

Related to Redmine - Feature #6204: Make the "New issue" menu item optional Closed 2010-08-25

Associated revisions

Revision 15740
Added by Jean-Philippe Lang almost 6 years ago

New issue raises an error if no projects available (#23410).

Revision 15741
Added by Jean-Philippe Lang almost 6 years ago

Adds :error_no_projects_with_tracker_allowed_for_new_issue i18n string (#23410).


#1 Updated by Toshi MARUYAMA almost 6 years ago

  • Category set to Issues
  • Status changed from New to Confirmed
  • Affected version set to 3.3.0

#2 Updated by Toshi MARUYAMA almost 6 years ago

  • Target version set to 3.3.1

#3 Updated by Toshi MARUYAMA almost 6 years ago

  • Related to Feature #6204: Make the "New issue" menu item optional added

#4 Updated by Jean-Philippe Lang almost 6 years ago

  • Status changed from Confirmed to Resolved
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Fixed in r15741, thanks for pointing this out.

#5 Updated by Jean-Philippe Lang almost 6 years ago

  • Status changed from Resolved to Closed

#6 Updated by Janeks Kamerovskis 9 months ago

I am hiting this error also today:

Redmine version 4.2.1.stable
Ruby version 2.7.3-p183 (2021-04-05) [aarch64-linux]
Rails version 5.2.5
Environment production
Database adapter Mysql2
Mailer queue ActiveJob::QueueAdapters::AsyncAdapter
Mailer delivery smtp
Subversion 1.13.0
Mercurial 5.3.1
Cvs 1.12.13
Bazaar 3.0.2
Git 2.25.1
Redmine plugins:
accept 0.0.2
additionals 3.0.2
bitbucket_reference_redmine 0.1.3
issue_recurring 1.4
localizable 0.4.0
redmine_checklists 3.1.18
redmine_contacts 4.3.4
redmine_contacts_invoices 4.1.8
redmine_dashboard 2.7.1
redmine_issues_tree 0.0.14
redmine_lightbox2 0.5.1
redmine_logs 0.2.0
redmine_mentions 0.0.1
redmine_tags 4.0.0
redmine_theme_changer 0.4.0
redmine_timelog_timer 2.0.1
redmine_work_time 0.4.1


Also available in: Atom PDF