Project

General

Profile

Employee CRM is not working

Added by synoptik . about 10 years ago

hello,
After deployment Employee CRM plugin, I got this error:

  Rendered news/_news.html.erb (164.2ms)
  Rendered plugins/systango_hrm/app/views/systango_hrm_employee_leaves/_hr_hook.html.erb (142.6ms)
  Rendered welcome/index.html.erb within layouts/base (997.9ms)
Completed 500 Internal Server Error in 1846.9ms

ActionView::Template::Error (PG::UndefinedTable: ERROR:  relation "systango_hrm_employee_leaves" does not exist
LINE 5:              WHERE a.attrelid = '"systango_hrm_employee_leav...
                                        ^
:             SELECT a.attname, format_type(a.atttypid, a.atttypmod),
                     pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
              FROM pg_attribute a LEFT JOIN pg_attrdef d
                ON a.attrelid = d.adrelid AND a.attnum = d.adnum
             WHERE a.attrelid = '"systango_hrm_employee_leaves"'::regclass
               AND a.attnum > 0 AND NOT a.attisdropped
             ORDER BY a.attnum
):
    15: 
    16:   <h3><%= l(:heading_for_latest_leaves) %></h3>
    17: 
    18:   <% if leaves_of_current_user.blank? %>
    19:     <p><%= l(:message_for_no_latest_leaves) %></p>
    20:   <% else %>
    21:     <%= render :partial => "systango_hrm_employee_leaves/requests", :locals => { :leaves => leaves_of_current_user[0...5] } %>
  lib/redmine/hook.rb:111:in `block in render_on'
  lib/redmine/hook.rb:61:in `block (2 levels) in call_hook'
  lib/redmine/hook.rb:61:in `each'
  lib/redmine/hook.rb:61:in `block in call_hook'
  lib/redmine/hook.rb:58:in `tap'
  lib/redmine/hook.rb:58:in `call_hook'
  lib/redmine/hook.rb:158:in `call_hook'
  app/views/welcome/index.html.erb:12:in `_app_views_welcome_index_html_erb__3173068491047933046_11884820'

What table I should create in database for use it?


Replies (1)

RE: Employee CRM is not working - Added by synoptik . almost 10 years ago

Unfortunately
rake redmine:plugins:migrate RAILS_ENV=production
fail on my system with last plugin version from git.
And I start creates tables from
./systango_hrm/test/fixtures/

where I found the most complete information about them.

Started POST "/leaves" for 127.0.0.1 at 2014-11-20 20:23:44 -0500
Processing by SystangoHrmEmployeeLeavesController#create as HTML
  Parameters: {"utf8"=>"✓",
"authenticity_token"=>"EAHP2PMifay11k+TMDdw8CYA9vbh/lDlfUoH6pp8rZU=",
"apply"=>{"leave"=>"self"},
"systango_hrm_employee_leave"=>{"is_half_day"=>"0",
"is_maternity_leave"=>"0", "leave_start_date"=>"2014-12-01 12:00 am",
"leave_end_date"=>"2014-12-14 12:00 am", "subject_id"=>"0",
"remark"=>"vacations"}, "receiver_id"=>{"id"=>[""]}, "view"=>"Submit
and view"}
  Current user: testuser (id=51)
Completed 500 Internal Server Error in 220.3ms

NoMethodError (undefined method `id' for nil:NilClass):
  plugins/systango_hrm/app/models/systango_hrm_employee_leave.rb:48:in
`validate_ml_leave'
  activesupport (3.2.19) lib/active_support/callbacks.rb:517:in
`_run__3005439312009315246__validate__4403807758525349219__callbacks'
  activesupport (3.2.19) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.19) lib/active_support/callbacks.rb:385:in
`_run_validate_callbacks'
  activesupport (3.2.19) lib/active_support/callbacks.rb:81:in `run_callbacks'
  activemodel (3.2.19) lib/active_model/validations.rb:228:in `run_validations!'

when I try to apply the leaves...

    (1-1/1)