Details
Description
This functionality is part of the new HRJob extension.
1. On enabling 'hrjob' extension, add menu link 'civicrm/csvimporter/import?reset=1&entity=hrjob'
under Contacts => Import => Jobs
Use the same format as csvimporter to invoke the api exporter with entity 'hrjob' in the url.
Refer Eileen's extension - https://github.com/eileenmcnaughton/nz.co.fuzion.csvimport/tree/master/CRM/Csvimport/Import
and integrate it inside the hrjob extension to create a new Import wizard with same page-flow as Core Import.
2.
- Map field drop-down select values are class core properties for the following :
- HRJob
- HRJobPay
- HRJobHour
- HRJobHealth
- HRJobPension
hrjob api exporter should expose all fields for HRJob, HRJobPay, HRJobHour, HRJobHealth, HRJobPension
Check setFields function in api parser to have all the said fields in the mapper.
- Mapping for Contact ID is required - throw validation error on Continue if no column is mapped as a Contact ID.
- Mappings may be saved/retrieved.
Add new option value for 'Import HR Job' to option group with name = 'mapping_type'
Use the option_value.value to set civicrm_mapping.mapping_type_id for this mapping.
- Import file validation should check that contact_id column values are not null and are integers. Add rows to Preview error array which do not meet these requirements.
- Import processing should validate field types (e.g. amount is numeric, etc.). Then insert a Job record AND associated pay, hour, health and pension record.
- Import function needs to handle import of jobs and info regarding pay, health, hour and pension all at once. Check import function in api parser to create job record using the api layer and then create associated pay, hour, health
and pension record as well.