ucsdlib / hifive

An application supporting an Employee Recognition program workflow
MIT License
0 stars 0 forks source link

LDAP: we cannot rely on the mail attribute #360

Closed mcritchlow closed 4 years ago

mcritchlow commented 4 years ago

Descriptive summary

We are getting some failures with the LDAP::Queries.employees query having to do with at least one valid employee not having a mail value in their record. This is problematic for High Five since it relies on email. So we need to take addition steps in this code.

Note: These errors seem to happen with "Emeritus" employees. We should consult Kacy as to whether we want to filter these employees out of the application and, if so, consult @allisonflick and Mack to see if there is a reliable way of doing so with our LDAP query.

Rationale

Currently the call to this query, which runs nightly, will fail when it hits a record like the one described. Instead, we should do something like:

Expected behavior

Running the nightly LDAP rake task to keep the employee table populated should not result in an error if a record returned from the query doesn't have a mail attribute.

Actual behavior

Fantastic failure.

Steps to reproduce the behavior

  1. Do this
  2. Then do this...

Related work

Link to related tickets or prior related work here.