Skip to content

Commit dfa280d

Browse files
Add exceptions for FTE check
1 parent 0032a1a commit dfa280d

5 files changed

Lines changed: 21 additions & 1 deletion

File tree

config/config.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,15 @@ def check_ucpath_code(type, value)
5757
@ucpath_codes[type].include? value
5858
end
5959

60+
# If the Job Code is in either the fte_check_exclusions or emeritus_job_code
61+
# lists, you must skip the FTE check..., otherwise DO NOT skip the check.
62+
def skip_fte_check?(job_code)
63+
return true if check_ucpath_code('fte_check_exclusions', job_code)
64+
return true if check_ucpath_code('emeritus_job_code', job_code)
65+
66+
false
67+
end
68+
6069
private
6170

6271
def load_settings!(path)

config/ucpath_codes.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,11 @@ uc_extension_faculty:
9494
# of any student affiliations
9595
priority_job_codes:
9696
- "006761"
97+
98+
# The 0FTE (percent of full time employment) excludes these
99+
# job codes
100+
fte_check_exclusions:
101+
- "CWR022"
102+
- "CWR015"
103+
- "CWR003"
104+
- "CWR016"

lib/ucpath/jobs.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ def valid_org_relationship?(j)
107107
# 4. The job will be ineligible if the percentage of full time is zero
108108
# Note - percentage of full time can appear in 2 different places (ugh)
109109
def positive_full_time?(j)
110+
return true if Config.skip_fte_check?(j.job_code)
111+
110112
values = []
111113
values << j.percent_of_fulltime if j.respond_to?(:percent_of_fulltime)
112114
values << j.percent_of_fulltime_job if j.respond_to?(:percent_of_fulltime_job)

lib/ucpath/user.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def create_user_record
149149
# PERCENT OF FULL TIME CHECK
150150
# AP-559 If an employee is in a position that is 0 FTE,
151151
# their record should should be filtered out from the UCPath files.
152-
if percent_of_fulltime.zero? && percent_of_fulltime_job.zero?
152+
if !Config.skip_fte_check?(job_code) && (percent_of_fulltime.zero? && percent_of_fulltime_job.zero?)
153153
logger.info "#{id} - Ineligible: Percentage of Full Time Check"
154154
return nil
155155
end

spec/lib/ucpath_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,7 @@ def eligible(job)
528528

529529
before do
530530
allow(Date).to receive(:today).and_return(today)
531+
allow(Config).to receive(:skip_fte_check?).and_return(false)
531532
end
532533

533534
context "when hr_status_code is not 'A'" do

0 commit comments

Comments
 (0)