code-corps / code-corps/code-corps-api

Implement basic task matcher module

Aperta
#736 2 commenti 0 reazioni 1 assegnatario Rivendicata da @ignu Vedi su GitHub
Difficulty: Easy good first issue hacktoberfest in progress needs estimate
Lingua principale
Elixir
Stelle
234
Fork
82
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

# Problem

From #668 we need a very basic task matcher module.

We would require a module, for example, `UserTaskMatcher` with a `&match_user/2`

```Elixir
defmodule CodeCorps.UserTaskMatcher do
@default_task_count
def match_user(%CodeCorps.User{} = user, task_count // @default_task_count) do
get_list_of_tasks_with_most_overlapping_skills(tasks_count)
end

defp get_list_of_tasks_with_most_overlapping_skills(amount) do
# implementation goes here. probably a simple query initially
# join user skills and tasks skills, group and count by task, order by count
# limit the number of results to amount
end
end
```

## Subtasks

- write described module
- write tests for it

# References

- taken from #668

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.