Skip to content

Refactor usage of users endpoint#1

Merged
JeroenBL merged 8 commits intomainfrom
refactor-usage-of-users-endpoint
Jul 25, 2025
Merged

Refactor usage of users endpoint#1
JeroenBL merged 8 commits intomainfrom
refactor-usage-of-users-endpoint

Conversation

@sjoerdvandijkt4e
Copy link
Copy Markdown
Contributor

Using the users endpoint for getting the data from Intus. This way is faster and more reliable.

@sjoerdvandijkt4e sjoerdvandijkt4e added the needs-review Indicates that the PR is ready and waiting for review label Feb 12, 2025
@JeroenBL
Copy link
Copy Markdown
Contributor

Repo bijgewerkt met:

  • CHANGLOG.MD
  • Status badges in de README.

Tevens in de main branch de GH action: createRelease toegevoegd. Bij een merge wordt de de release dan automatisch gemaakt.

@JeroenBL JeroenBL added the current-sprint PRs to be addressed within the current sprint label Feb 28, 2025
Copy link
Copy Markdown
Member

@Rick-Jongbloed Rick-Jongbloed left a 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.

Comment thread persons.ps1

Write-Information "Retrieved $($persons.count) persons from the source system."
$personObjects = $personsCorrected | ConvertFrom-Json
$persons = $personObjects | Where-Object active -eq "True"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Gaat dit werken met afgelopen en toekomstige regels?
  2. Is het nodig dat dit gaat werken?
  3. Is dit gedocumenteerd in de readme?

Comment thread persons.ps1

$ShiftContract = @{
externalId = "$($person.uname)$($rosterDate)$($time)$($part.group.externalId)"
externalId = "$($person.resource)$($rosterDate)$($time)$($counter)$($part.group.externalId)"
Copy link
Copy Markdown
Member

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?

Comment thread persons.ps1

$ShiftContract = @{
externalId = "$($person.uname)$($rosterDate)$($time)$($part.group.externalId)"
externalId = "$($person.resource)$($rosterDate)$($time)$($counter)$($part.group.externalId)"
Copy link
Copy Markdown
Member

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)

Copy link
Copy Markdown
Contributor

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.

Comment thread persons.ps1
FirstName = $person.firstName
LastName = $person.lastName
Email = $person.email
PhoneNumber = $person.phone
Copy link
Copy Markdown
Member

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?

Comment thread readme.md
Copy link
Copy Markdown
Member

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?

Comment thread persons.ps1
$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)
Copy link
Copy Markdown
Contributor

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" .

@JeroenBL JeroenBL added pending-author-update PR is waiting for the author to make necessary modifications or updates and removed needs-review Indicates that the PR is ready and waiting for review labels May 30, 2025
@JeroenBL
Copy link
Copy Markdown
Contributor

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.

@JeroenBL JeroenBL merged commit e6a38ad into main Jul 25, 2025
@JeroenBL JeroenBL deleted the refactor-usage-of-users-endpoint branch July 25, 2025 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

current-sprint PRs to be addressed within the current sprint pending-author-update PR is waiting for the author to make necessary modifications or updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants