Uploaded image for project: 'CiviHR'
  1. CiviHR
  2. HR-224

Implement absence data model


    • Type: New Feature
    • Status: Done/Fixed
    • Priority: Critical
    • Resolution: Won't Do
    • Affects Version/s: HR-1.2
    • Fix Version/s: HR-1.2
    • Component/s: Absence
    • Labels:
    • Sprint:
      Sprint 1


      Details: http://wiki.civicrm.org/confluence/display/HR/Absence+-+Data+Model


      1. Create extension, org.civicrm.hrabsence with an upgrader
      2. In Upgrader::install, register new activity type "Public Holiday" (unless it already exists)
      3. In Upgrader::install, register new CiviCRM component, "Timesheet" (unless it already exists)
      4. In Upgrader::install, register new activity type "Absence" (unless it already exists) and set its component to "Timesheet". Ensure that "Absence" doesn't appear as an option for creating new activities. (There may be an option you can set in the activity-type's OptionValue record.)
      5. Create setup.sh process for DAOs/sql generation (similar to hrjob)
      6. Create entity AbsenceType with DAO/BAO/SQL/API. (See schema in wiki)

      • The BAO's create/update function should define special behavior.
      • If the option "allow_debit" is set, then it auto-creates an activity-type with the same name as the absence-type. Retain the activity-type-id.
      • If the option "allow_credit" is set, the nit auto-creates an activity-type. The name is based on the name of the absence-type – ts('%1 (Credit)'). Retain the activity-type-id.
      • Include API unit-tests to ensure that various combinations of allow_debit/allow_credit work as expected.
        7. Create entity AbsencePeriod with DAO/BAO/SQL/API. (See schema in wiki)
        8. Create entity AbsenceEntitlement with DAO/BAO/SQL/API. (See schema in wiki)
        9. In hook_managed, declare all the AbsenceTypes.


          Issue Links



              • Assignee:
                yashodha Yashodha Chaku
                timotten Tim Otten
              • Votes:
                0 Vote for this issue
                2 Start watching this issue


                • Created: