HR-18 CiviHR - Cross-Cutting - Sample dataset

    Details

    • Type: Epic
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Won't Do
    • Affects Version/s: HR-1.0
    • Fix Version/s: HR-1.0
    • Component/s: None
    • Labels:

      Description

      We would a randomized dataset for demo and playing purpose.

      The dataset could be in the form of another extension (civihr/hrsample) which when installed produces the dataset.

        Attachments

          Activity

          [HR-18] CiviHR - Cross-Cutting - Sample dataset
          Tim Otten added a comment -

          Adding 4h because the sample data will need to be adapted to the new job schema.

          Tim Otten added a comment -

          Following implementation of CRM-12922, we need to create sample data for the new job tables. A few key things to note:

          • For each HRJob, there may be 0 or 1 records for each of these entity types: HRJobHealth, HRJobHour, HRJobPay, HRJobPension.
          • For each HRJob, there should be one HRJobLeave for each leave_type. (To get a list of valid leave_types, one can call civicrm_api('HRJobLeave', 'getoptions', array('field' => 'leave_type'))
          • For each HRJob, there may be 0 to many HRJobRoles. The sample-data should include cases with 0, 1, 2, and 3 job roles.
          Ravish Nair added a comment -

          Submitted PR for the changes as per the above comment: https://github.com/civicrm/civihr/pull/31

          Tim Otten added a comment -

          Small change request – there's a spot in the code like this:


          //For each HRJob, there may be 0 or 1 records for each of these entity types: HRJobHealth, HRJobHour, HRJobPay, HRJobPension.
          $cnt = mt_rand(0, 1);
          for ($i = 1; $i <= $cnt; $i++) {


          This calls mt_rand() once and then makes all four records or makes no records. Each entity should have its own mt_rand(0,1) call. (We might generate HRJobHealth and HRJobHour but not HRJobPay or HRJobPension. Treating each as a separate variable produces 2^4=16 possible combinations.)

          Tim Otten added a comment -

          Note: Treating this now as an "Epic" ticket rather than as a "Sub-task" ticket, so the "Component" is unset and the set "Label" is set to "CiviHRPhase1".

            People

            • Assignee:
              Andrew Tombs
              Reporter:
              Deepak Srivastava

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 days, 2 hours, 15 minutes
                4d 2h 15m