Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation failed: Project can't be blank #4

Open
istupin opened this issue Sep 13, 2012 · 2 comments
Open

Validation failed: Project can't be blank #4

istupin opened this issue Sep 13, 2012 · 2 comments

Comments

@istupin
Copy link

istupin commented Sep 13, 2012

Hi. I've installed plugin, following step by step to install-notes.pdf. Sure to set proper hard-coded values into controller and js. But, trying to create an event, i've got this in production.log:

Processing MeetingCalendarsController#create (for 192.168.1.161 at 2012-09-13 07:38:05) [GET]
Parameters: {"controller"=>"meeting_calendars", "priority_id"=>"4", "author_id"=>"1", "action"=>"create", "recur"=>"5", "status_id"=>"1", "subject"=>"ytj", "event_id"=>"0", "custom_field_values"=>{"3"=>"2012-09-13", "2"=>"room 1", "1"=>"11:30", "0"=>"10:30"}}

ActiveRecord::RecordInvalid (Validation failed: Project can't be blank):
vendor/plugins/redmine_meeting_room_calendar/app/controllers/meeting_calendars_controller.rb:35:in `create'

I am using:
Redmine 1.4.1
Ruby 1.8.7

Please help, and sorry for my english.

Thanks

@wicola
Copy link

wicola commented Jan 31, 2013

I'm facing the same problem

ActiveRecord::RecordInvalid (Validation failed: Project can't be blank):
vendor/plugins/redmine_meeting_room_calendar/app/controllers/meeting_calendars_controller.rb:35:in `create'

I'm using
Redmine 1.3.0.stable
Ruby 1.8.7

Does anyone know why the project is blank?
I have replaced the "215" value of @project_id in meeting_calendars_controller.rb with "booking", which is the ID of the project I created for this meeting room plugin according to the instructions.

Thanks.

@benny59
Copy link

benny59 commented May 30, 2014

I spent sometime on this issue as the plugin really fits my needs. (meeting room booking).
I made the installation on my testing virtual machine.
As it is a testing machine hardcored custom_fields are neither the ones defined on meeting_calendars_controller nor in sequence (i.e. start_time on my db table has id=8 but it is the 6th if parsed as selection query).
I understood the logic and modified the mentioned file accordingy in order to have the correct new event pick up choices.

This is the modified init:
def initialize
@project_id = "58" #Hard Coded project_id for Book Meeting Room Project
@tracker_id = '21' #Hard Coded tracker_id for Book Meeting Room Project
@custom_field = CustomField.all
@start_time = @custom_field[6].possible_values #Hard Coded custom field value for start times for Book Meeting Room Project
@end_time = @custom_field[7].possible_values #Hard Coded custom field value for end times for Book Meeting Room Project
@meeting_rooms=@custom_field[8].possible_values #Hard Coded custom field value for meeting rooms for Book Meeting Room Project

This is the log:
Processing MeetingCalendarsController#create (for 192.168.56.1 at 2014-05-30 16:57:20) [GET]
Parameters: {"custom_field_values"=>{"6"=>"2014-06-02", "5"=>"Sala1", "4"=>"10:00", "3"=>"08:00"}, "subject"=>"Marco is out of Office", "controller"=>"meeting_calendars", "status_id"=>"1", "priority_id"=>"4", "event_id"=>"0", "author_id"=>"4", "recur"=>"1", "action"=>"create"}

ActiveRecord::RecordInvalid (Validation failed: Start Time can't be blank, End Time can't be blank, Meeting Room can't be blank, Meeting Day can't be blank):
vendor/plugins/qbmeetingroomplugin/vendor/plugins/redmine_meeting_room_calendar/app/controllers/meeting_calendars_controller.rb:36:in `create'

I am available for tests, please give clues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants