GithubHelp home page GithubHelp logo

civihr's Introduction

CiviHR is a collection of extensions defining a human-resources application that runs on top of the CiviCRM platform.

See also:

Download

Clone this git repository, e.g.

mkdir -p /var/www/drupal/vendor/civicrm
cd  /var/www/drupal/vendor/civicrm
git clone git://github.com/civicrm/civihr.git

Install

If you have Drush installed, then you can enable all the extensions at once:

cd /var/www/drupal
bash vendor/civicrm/civihr/bin/drush-install.sh --with-sample-data

If you're familiar with different ways to call drush, then you can use the same techniques with drush-install.sh, e.g.

cd /var/www/drupal/vendor/civicrm/civihr
./bin/drush-install.sh --with-sample-data --root=/var/www/drupal

## or

cd /var/www/drupal/sites/example.com
bash /var/www/drupal/vendor/civicrm/civihr/bin/drush-install.sh --with-sample-data

Read the drush-install.sh for details.

Schema development

Most CiviHR extensions define their schema using CiviCRM's custom-data system. During installation, modules using this sytem will load "xml/auto_install.xml" which was [re]generated using the command "civix generate:custom-xml". (Note: The XML won't be reloaded during upgrade. To support upgrades, one must add an upgrade_N() function to CRM/*/Upgrader.php.)

The hrjob extension uses XML/GenCode to manage schema. When modifying the schema, be sure to:

  1. Edit the XML files in "hrjob/xml/schema/CRM/HRJob"
  2. Run the command "hrjob/bin/setup.sh {CIVICRM_ROOT}"
  3. Manually copy relevant SQL snippets from "{CIVICRM_ROOT}/sql/civicrm.mysql" to "hrjob/sql/auto_install.sql"
  4. (If appropriate) Add an upgrade_N() function to hrjob/CRM/HRJob/Upgrader.php

Test

To run the unit-tests, one must configure CiviCRM to run unit-tests, install civix, and link civix to CiviCRM. To validate that the link is setup, run:

user@host:/path/to/civihr/hrjob$ civix civicrm:ping
Ping successful

To execute particular tests, use "civix test":

user@host:/path/to/civihr/hrjob$ civix test api_v3_HRJobTest
Adding Individual
Adding Organization
PHPUnit 3.6.10 by Sebastian Bergmann.

.
Installing civicrm_tests_dev database


Time: 24 seconds, Memory: 28.25Mb

OK (1 test, 4 assertions)

(Note: Civix's design assumes that there are two databases. The "live database" used with "civix civicrm:ping" is part of a fully-functioning CiviCRM/CiviHR installation. The "headless testing database" is only used for testing -- it is conventionally called "civicrm_tests_dev".)

(Note: For "hrjob", there's an extra pre-requisite: before running tests, run "hrjob/bin/setup.sh {CIVICRM_ROOT}".)

civihr's People

Contributors

totten avatar vivekarora avatar ti-nishant avatar davecivicrm avatar colemanw avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.