HR-216 HR cost reports should adjust based on pay-unit

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Critical
    • Resolution: Won't Do
    • Affects Version/s: HR-1.0
    • Fix Version/s: HR-1.2
    • Component/s: Jobs, Reporting
    • Labels:
      None
    • Sprint:
      Sprint 12d

      Description

      — STEPS TO REPRODUCE —

      1. Create a new/clean database.
      2. Create a contact with a job that pays $100/day.
      3. Run the report, "Annual and Monthly Cost Equivalents Report".
      4. Observe: The listed annual cost is $100/year. (The monthly cost intuitively appears as 1/12th the annual cost, but the annual cost is way off.)

      — WHAT'S MISSING (GENERAL GOALS) —

      a. For each pay-unit (per day, per month, per year), we need a formula that annualizes the cost.
      b. The formula will most likely need some more data (eg either a system-wide policy on "hours per year", "days per year", etc; or else some per-record data about "days per year for this person"). We need to define the process/UI for entering that data.
      c. When a user edits a job's pay, we should display the calculations done to estimate annualized cost.
      d. When a user runs the report, we should use the formulas.
      e. We need to update the test-case for the report (eg https://github.com/civicrm/civihr/blob/master/hrreport/tests/phpunit/CRM/HRReport/Form/Contact/fixtures/summary-annual-monthly-equiv.csv ).

        Attachments

          Issue Links

            Activity

            [HR-216] HR cost reports should adjust based on pay-unit
            Tim Otten added a comment -

            Attach mockup of annualized-pay-estimates.

            David Greenberg added a comment -

            The UI in the mockup is quite clear and appropriate. The only change I'd recommend is in the intro text for the admin UI (editing the pay constants):

            Current text:
            "The constants defined in this box are used to estimate the amount of work done in each year."
            "For example, if an employee makes $10 / hour and the standard is 2,000 hour/year then the estimate annual pay is $20,000."

            Suggested text:
            "The values below are used to calculate the estimated Annualized Pay for each job based on it's Pay Rate."
            "For example, if "hours per year" is 2,000 and the Pay Rate for a job is $10 / hour, then the estimated Annualized Pay for that job is $20,000."

            We should also parameterize the text to use the configured default currency in the amount portions of the strings.

            Tim Otten added a comment -

            A good point was raised that this doesn't weight based on the person's time commitment (eg their FTE value). I don't think that will remove any work – so we'll add in support for weighting by FTE in a second pass.

            Tim Otten added a comment -
            Tim Otten added a comment -

            Several outstanding issues in the PR.

            Tim Otten added a comment -

            Reminder to self about outstanding tasks:

            • Update UI to match wireframe (esp. to support locking/unlocking estimate)
            • Update reports
            • Investigate weird settings initialization (works fine with "bash bin/drush-install.sh" but not "bash bin/drush-install.sh --with-sample-data")
            • Nice-to-have: Automatically calculate hours_fte (using same general approach as calculating annual pay)
            Tim Otten added a comment -

            This should be implemented now, but note the existence of issues HR-286 and HR-287. I'm working on HR_287 but will leave HR-286 for another person / another day.

              People

              • Assignee:
                Nishant Bhorodia
                Reporter:
                Tim Otten

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 days
                  2d