-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor usage of users endpoint #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This branch uses the Users endpoind in stead of HumanResources.
|
Repo bijgewerkt met:
Tevens in de main branch de GH action: createRelease toegevoegd. Bij een merge wordt de de release dan automatisch gemaakt. |
Rick-Jongbloed
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ziet er goed uit, maar ik denk dat we dit nog even moeten finetunen voordat we het live zetten. Over naar Jeroen.
|
|
||
| Write-Information "Retrieved $($persons.count) persons from the source system." | ||
| $personObjects = $personsCorrected | ConvertFrom-Json | ||
| $persons = $personObjects | Where-Object active -eq "True" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Gaat dit werken met afgelopen en toekomstige regels?
- Is het nodig dat dit gaat werken?
- Is dit gedocumenteerd in de readme?
|
|
||
| $ShiftContract = @{ | ||
| externalId = "$($person.uname)$($rosterDate)$($time)$($part.group.externalId)" | ||
| externalId = "$($person.resource)$($rosterDate)$($time)$($counter)$($part.group.externalId)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is het niet beter om een scheidingsteken tussen de verschillende waarden te plaatsen?
|
|
||
| $ShiftContract = @{ | ||
| externalId = "$($person.uname)$($rosterDate)$($time)$($part.group.externalId)" | ||
| externalId = "$($person.resource)$($rosterDate)$($time)$($counter)$($part.group.externalId)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ik heb het connectorteam gevraagd om eens te kijken of ze een betere manier kunnen bedenken om de contract id te maken (zonder counter)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Als je de volgorde van $day.parts verandert (bijvoorbeeld na sortering of filtering), dan verandert ook de waarde van $counter, wat leidt tot een andere externalId voor exact dezelfde shift en daarbij is een counter is betekenisloos bij het terugzoeken van een entry. Je weet niet welke shift met counter 3 bedoeld werd.
| FirstName = $person.firstName | ||
| LastName = $person.lastName | ||
| Email = $person.email | ||
| PhoneNumber = $person.phone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Phone number is removed. Is this by accident?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moet hier nog iets bij wb de 'active' person filter?
| $counter = ($counter + 1) | ||
| # Define the pattern for hh:mm-hh:mm | ||
| $pattern = '^\d{2}:\d{2}-\d{2}:\d{2}' | ||
| $time = [regex]::Match($part.shift.uname, $pattern) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Als $time.value leeg is (regex matcht niet), dan staat in $time:"System.Text.RegularExpressions.Match" .
|
Hier moet nog even naar gekeken worden. De counter (telt de 'parts' van een dag ') kan mogelijk voor issue's zorgen waarbij een part niet altijd het juiste ID krijgt toegewezen. Dit kunnen we anders oplossen. Bijvoorbeeld door een combinatie van stabiele, unieke eigenschappen van de shift, zoals: Persoons-id, Rosterdatum, Starttijd, Groeps-id,,Shift-id (indien beschikbaar),Functiecode of -naam. Eventueel kunnen we dat nog hashen. Kunnen we testen met een $part die we twee keer door de flow sturen. Moet dan exact hetzelfde ID opleveren. |
Using the users endpoint for getting the data from Intus. This way is faster and more reliable.