Feature/userinfo - #273
Conversation
Bundle ReportChanges will increase total bundle size by 280 bytes (0.01%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: viper-frontend-esmAssets Changed:
Files in
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #273 +/- ##
==========================================
- Coverage 44.88% 43.22% -1.67%
==========================================
Files 940 1102 +162
Lines 49107 53078 +3971
Branches 6577 6908 +331
==========================================
+ Hits 22044 22945 +901
- Misses 26125 29121 +2996
- Partials 938 1012 +74
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
This comment was marked as resolved.
This comment was marked as resolved.
…modal) and responds to code-quality bot userinfo recommendations
22567dc to
694ecd4
Compare
This comment was marked as resolved.
This comment was marked as resolved.
|
@coderabbitai review |
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 219 out of 221 changed files in this pull request and generated no new comments.
Suppressed comments (1)
web/Areas/Directory/Models/IndividualSearchResultWithIDs.cs:49
- This branch removes the null-guard on
PostalAddress, butLdapUserContact.PostalAddressis declared= null!and is only assigned when the LDAP entry actually contains apostalAddressattribute, so it can be null at runtime. For a contact without a postal address this will throw aNullReferenceException. Note the base classIndividualSearchResulthandles the same field null-safely (ldapUserContact.PostalAddress?.Replace(...) ?? ""), so the two paths are now inconsistent. Please restore the null-safe access here.
PostalAddress = ldapUserContact.PostalAddress.Replace("$", '\n'.ToString());
|
@JasonRobertFrancis Three threads still open after c18d9c8:
|
rlorenzo
left a comment
There was a problem hiding this comment.
Medium and low items from the same pass, inline.
|
@JasonRobertFrancis I was testing this on TEST: https://secure-test.vetmed.ucdavis.edu/2/UserInfo/02725606 and comparing against VIPER1: https://secure-test.vetmed.ucdavis.edu/default.cfm?page=userinfo&id=1000610632&mothraID=02725606
|
For the effective date, it looks like this is pulling the effective date of the last change to the position. It might make more sense to show the effdt on the job record (the effective date of the last change to the job) in the summary and history views. Employees have an original hire date, but not a hire date to a specific job. I would also suggest removing the reports to column from the uc path history. I removed this from the uc path view on the current directory because it can be ambiguous when looking at historical data (which is why it looks like Rex is reporting to Dan). I checked Rex's permissions on test and the counts look good. The prod user info page is double counting some permissions. |
| { | ||
| } | ||
|
|
||
| public virtual DbSet<AbsenceCalendarDV> AbsenceCalendarDVs { get; set; } |
There was a problem hiding this comment.
@JasonRobertFrancis The four new contexts scaffold 182 entities and the service queries 9 of them: PPS has 134 DbSets and uses VwPeople, VwPersonJobPositionAlls and VwPersonJobPositions; IDCards has 25 and uses IdCards, DvtCardStatuses and DvtReasons; EquipmentLoan has 13 and uses Loans; Keys has 10 and uses Keys and KeyAssignments. That is 10,531 of the 30,584 lines this PR adds, and it pulls in tables no one is querying right now, like UcpathMissingPerson20190821 and UcpathmissingpersonBk. Every one of them now has to track its database by hand. Please cut each context down to what it queries; re-scaffolding a view later takes a minute.
There was a problem hiding this comment.
I'm guessing these tables were pulled in by the EF scaffolding tool (our pre-AI method of automating the creation of context classes). I'm OK with leaving these in because it's likely things will need them in the future, except for tables with names indicating they are a backup or copy, which may or may not exist in production and could probably be deleted from the DB altogether.
There was a problem hiding this comment.
@JasonRobertFrancis Per @bsedwards above, the backup/copy tables. All three are in PPS, all HasNoKey(), none queried:
| Entity | DB table | Location |
|---|---|---|
EthnicityGender20210201 |
ethnicityGender_2021_02_01 |
PPSContext.cs:2646 + Models/PPS/ |
UcpathMissingPerson20190821 |
UCPathMissingPerson_20190821 |
PPSContext.cs:11137 + Models/PPS/ |
UcpathmissingpersonBk |
ucpathmissingperson_bk |
PPSContext.cs:246, :11306 + Models/PPS/ |
Each is a dated snapshot or _bk copy of a table the context already maps. The IDCards, EquipmentLoan and Keys contexts have none.
| <title>@ViewData["Title"] - VIPER(2.0)</title> | ||
| <link rel="stylesheet" href="~/css/site.css" asp-append-version="true" /> | ||
| @if (HttpHelper.HttpContext != null && HttpHelper.HttpContext.Request.Path.ToString().ToLower().Contains("/directory")) | ||
| @if (HttpHelper.HttpContext != null && (HttpHelper.HttpContext.Request.Path.ToString().ToLower().Contains("/directory") || HttpHelper.HttpContext.Request.Path.ToString().ToLower().Contains("/userinfo"))) |
There was a problem hiding this comment.
@JasonRobertFrancis Two files carry edits this feature does not need. launchSettings.json flips launchBrowser to false and strips the file's BOM, which diverges from main for everyone who runs the project. This layout renames UserHelper to userHelper in five places and drops its BOM alongside the one change it does need, the /userinfo check that loads directory.css. Every MVC page renders this file, so holding its diff to that css line makes it easier to review now and to revert later.
No description provided.