Skip to content
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

Fetch people search entries from ptime, else Skills fallback | PuzzleTime #6 #745

Open
4 tasks done
RandomTannenbaum opened this issue Jul 2, 2024 · 1 comment · Fixed by #748
Open
4 tasks done
Assignees

Comments

@RandomTannenbaum
Copy link
Collaborator

RandomTannenbaum commented Jul 2, 2024

Introduction
At the moment the people search in Skills searches for people in the Skills Database. We want to rewrite this logic. We now want it to make an API call to the PuzzleTime API and load all employees from there.

The people should be fetched only when the dropdown is opened. This can happen by replacing the dropdown with another dropdown via a Turboframe.

Then the search only searches over the employees coming from the PuzzleTime API. The search also should only show active employees.

Important: If the Ptime API is not available, we still want to search over the people from PuzzleSkills.

When clicking on an employee, we still navigate to the detailed profile according to the id. Yet when an employee is clicked that has not been created, it navigates to person/new?ptime_employee_id={id}. After the data has been fetched and the person created, it automatically redirects to the newly created person.

  • Make sure ptime employee search is only active when ptime employees is configured
  • Make sure person/new?ptime_employee_id={id} does not fail if person exists in the meantime
  • person#ptime_employee_id with unique validation, validate not null when ptime employees enabled

ToDo

  • Make the employee search fetch all entries and then search over them. Only search over active employees.
  • If Ptime API is not available, search over people from Skills
  • Rewrite the routing, make a new employee redirect to /new and then to the profile after that
  • Tests

Approach on fallback: https://codimd.puzzle.ch/WTmNcP5bT3KfQQHC9vRv2A#

@ManuelMoeri
Copy link
Collaborator

Stand 19.07.2024
Alle features wurden erfüllt, neue Tests sind geschrieben & alte Tests gefixt.

Falls ich Test cases vergessen habe bitte einfach kurz hinzufügen.
Ich bin ab Morgen in den Ferien aber bin für Fragen entweder auf dem PuzzleChat oder auf meinem Handy allgemein erreichbar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants