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

Tasks Level Feature #72

Open
12 tasks
rohan09-raj opened this issue Apr 25, 2022 · 15 comments
Open
12 tasks

Tasks Level Feature #72

rohan09-raj opened this issue Apr 25, 2022 · 15 comments
Assignees
Labels
backend backlog enhancement New feature or request feature task A big ticket item that needs to come up as a feature frontend

Comments

@rohan09-raj
Copy link

rohan09-raj commented Apr 25, 2022

Progress

Description Summary

  • Each task we create will contain a label that is considered to be the level of that task.
  • When the user completes the n (suppose 5) number of that level of task, they can be considered as that level of developer
  • Labels can be specific to frameworks or libraries we have (like React Level 1).
  • Dynamically handle the available tasks for any particular developer (user) - (Service)
@rohan09-raj rohan09-raj added enhancement New feature or request feature task A big ticket item that needs to come up as a feature frontend backend labels Apr 27, 2022
@rohan09-raj
Copy link
Author

rohan09-raj commented Apr 27, 2022

website-dashboard

  • A new field to be added to assign levels to that task
    For example: React Level 1, React Level 2, Ember Level 4 means as the level increases difficulty increases.

website-status

  • Categorise the tasks according to levels
  • Build a categorization of Tasks
  • Show only Tasks according to the level of that developer.

website-members

  • Check if the Task has COMPLETED status or not
  • Add a badge according to what the user has accomplished

website-backend

  • Modify Task Workflow APIs
  • Add one more field to /user/self i.e. skillLevel

@rohan09-raj
Copy link
Author

rohan09-raj commented May 4, 2022

Categorization of Tasks

  • There will be various skills categories depending upon the need
  • These categories will form a tree-like structure and when the user completes the certain level tasks, the skill badges are added accordingly to the user.
  • Below is an example that how the nesting of categories can be.

Example :

Frontend-1: React-1, Ember-1, JS-2, CSS-2, HTML-2, Documentation-1, PR-2
Backend-1: NodeJS-1, JS-2, Java-1, API-2, Postman-1, Documentation-1, Communication-1
System-Design-1: Frontend-1, Backend-1

Working of Tasks Assigning

Suppose a user has some certain levels already or no levels, so according to current data of the user,

  • The tasks available to assign will be skills with the lowest level.
  • If there are no tasks available for the lowest level, 2nd lowest will be shown, and if 2nd lowest is also not available then 3rd and so on.
  • If there are no tasks available for any category, then Super User should be able to assign challenges to the user like Lift-Simulation, Implement a Polyfill, or Solve this problem etc.

Example :

function (userId)

  • Current Levels: Frontend-1, Backend-2, Communication-2
  • Next Task - Lowest (F, B, S, D) = F-1 // F(n+1) = F2 ..
  • Find F2 from available --- There is no F2.... Yikes! --> Handling ... F, nextLowest(S, D, B) = S

@rohan09-raj

This comment was marked as off-topic.

@rohan09-raj
Copy link
Author

rohan09-raj commented Jun 1, 2022

Detailed Working

Step 1 :

(Dashboard Site)
Add a new field to Task i.e. Level of the Task - Typically group of Dropdowns
image

Here, there can be two cases :

  • Task Status is already assigned (Jump to Step )
  • Task Status is set to available (Continue with Steps)

Data gets stored with the levels
API Used: https://api.realdevsquad.com/tasks

Step 2 :

(Status Site)
Fetch the Idle Members [Maybe it needs to be corrected according to the current user status (set in my-site)]
Fetched Tasks Status should be 'AVAILABLE' [It needs to be corrected according to the current task status]
API Used: https://api.realdevsquad.com/members/idle

Step 3 :

Build an API that on click on taking the input of user's current levels and return back the tasks according to the level of that user. Internally it compares the level of task and the current levels of user.
Note: Need to figure out what parameters will be actually compared

**Rough Idea: **
1 -> Find the category with the lowest level and lowest + 1 with a minimum number of tasks done
2 -> Compare the two params i.e. category and level in tasks data with the output of 1st Step and return the tasks if the comparison is equal.

Step 4 :

After the task gets assigned and as soon as marked as completed on my-site, the API call will be made on /users/self to update the number of tasks done and levels.

Step 5 :

Now we have data points to show the current levels of the user.

How do we store the User Levels ??
-> In the user data, i.e /users/self API

skillLevel : {
  systemDesign: {
    level: 0,
    tasksDone: 0 // This will increase on 5 tasks done or if all sub categories has reached common levels
    frontend: {
      level: 1, // With the multiples of 5 of tasksDone value, level will increase, 5 tasks -> level 1
      tasksDone: 6,
    },
    backend: {
     level: 0, // With the multiples of 5 of tasksDone value, level will increase, 5 tasks -> level 1
     tasksDone: 3
    },
    additional: {
      level: 2,
      tasksDone: 11 // With the multiples of 5 of tasksDone value, level will increase, 10 tasks -> level 2
    },
  }
}

How do we store the task levels?
-> In the task data, we send level like this :

tasks:[{
  id:"CHthCdHcINQJoa6oBWSX",
  type: "feature",
  title:"Test One day task",
  purpose: "To check if everything is working",
  isNoteworthy: false,
  percentCompleted: 0,
  status: "ASSIGNED",
  createdBy: "ankush",
  assignee: pallab, 
  startedOn:1651084680.586,
  endsOn:1652294280.586,
  taskLevel: {
   category: "frontend",
   level: 2
  }
  completionAward: {
    dinero: 0,
    neelam: 0
  },
  lossRate: {
    dinero: 0,
    neelam: 0
  },
}]

Existing APIs Used

https://api.realdevsquad.com/tasks
https://api.realdevsquad.com/members/idle
https://api.realdevsquad.com/users/self

New APIs needed to be created

https://api.realdevsquad.com/tasks/TBD

@rohan09-raj
Copy link
Author

Availability Panel
Method -> Clicking on the tasks will render the eligible idle members

Bug Observed => Setting user status is not working in status site

@rohan09-raj
Copy link
Author

rohan09-raj commented Jun 4, 2022

Sequence Diagram for Tasks Level Feature

TaskLevelFeature_Sequence

@vinayak-trivedi
Copy link
Member

Additional suggestions

  • when a user creates an account with RDS he is automatically assigned lift simulation and it appears on his my site tasks, and when he completes it then he is assigned a task based on the info he provided about his skills on a form that will be provided in my site.

@vinayak-trivedi
Copy link
Member

vinayak-trivedi commented Sep 2, 2022

Milestone 1

  • Add a field to my site called skill level which is going to contain three subfields: frontend, backend, and system design for now. Those subfields are going to have a dropdown to select the level. Currently, there will be five levels 1 - 5.

  • If the user has any field level less than 2 then he will be assigned a task like lift simulation or progress bar or something else.

  • Upon completion of that task only the user will be assigned an RDS task.

  • If all the categories are above level 2 then the user will be assigned a RDS task directly.

  • Tasks are needed to have a field called taskLevel which will contain category and level subfields. For this, we need some more fields on the dashboard site like category and level. (PR for this is already raised by Rohan)

  • An API is needed to be made which will take the category and level as route params and return a task accordingly (assigned to me).

  • on completion of a task two API calls will be made to user/self and tasks/:skill/level` endpoint, and the user's skill level object will be updated and a new task will be assigned to him

@vinayak-trivedi
Copy link
Member

vinayak-trivedi commented Sep 10, 2022

Questions:

  1. How are we going to determine the skill level of the user in the beginning?

  2. we want to assign a task to the user automatically when he completes a task that was provided to him. For that, an API has been created ( draft PR raised today ) which will return a task based on the skill level of the user, but to assign it we need to change the task object by making a patch request to tasks/:id which will require a super_user role to update that task. So how are we going to change that task object to assign that to a dev?

@Mir-SA
Copy link

Mir-SA commented Sep 19, 2022

  • Suggestion

    • After task is completed, we can add skill & skill lvl of that task to skill model & create ref to user who completed task, Instead of Step 4 & 5 in Tasks Level Feature #72 (comment)
    • Because in current design, skillLevel is a map stored in user document which can likely grow quickly and hit doc size limit
    • using a different collection/sub-collection for skills can help avoid the limit
  • Differences

    • skillLevel in TL design are nested & related unlike skills in SM design Skills data modelling website-data-models#9 (comment) which are standalone & independent
    • Skill in TL are fixed. since there would 4 options on dashboard only. Opt => 1. Sys Design 2. FE 3. BE 4. Other
    • Unlike in SM where they were assumed dynamic. Likely from text input on dashboard
  • If we have to implement the suggested change we'll have to change the skill model or change the way input is given from dashboard

@vinayak-trivedi
Copy link
Member

As per the discussion in the main call on 22/09/2022, we want to give the super user the option to add tags of skill to a particular user, rather than assigning it automatically, the super user will get different events on the dashboard related to the task

@vinayak-trivedi
Copy link
Member

vinayak-trivedi commented Oct 1, 2022

Progress updates of task leveling feature

  1. PR merged for middleware which will be used to assign tasks to the user based on their skill levels Feat/assign task middleware website-backend#708
  2. Frontend PR to tell users that the task is completed and a new task will be given to them is raised added modal to show the user messages on updating the tasks website-my#276
  3. @ivinayakg has raised a PR to create logs of the task updation Status changed by User on the task will be logged website-backend#725
  4. I am working on another issue that will show all the logs to the superuser on the dashboard site, draft PR added feature to see task logs and provide skill tags website-dashboard#222
  5. Murlidhar is working on a task that allows the super user to edit the task category and level of the task Task level and category change website-status#316, he will raise the PR by tomorrow as per our discussion
  6. @Mir-SA is working on the user skill model https://github.com/Real-Dev-Squad/website-data-models/pull/11/files#r979428244

@vinayak-trivedi
Copy link
Member

vinayak-trivedi commented Oct 25, 2022

Limitation of task assigning middleware

  • it runs only when the user completes a task, so if a user is not assigned a task, task will not be automatically assigned to them
  • and even if they are assigned a task then also there is no guarantee that they will be assigned a task once they complete the given task, as there might be no task matching their skill level

Solution

  • we can make and schedule cloud functions to run every 10 days to check which users do not have a task, and assign them a task based on their skills.

@vinayak-trivedi
Copy link
Member

vinayak-trivedi commented Nov 29, 2022

Features in the first version of task leveling

  • Add levels to the tasks
  • Automatic assignment of task based on skills once the user completes their task
  • logs of all the tasks
  • An option for user to fetch task if they have no in-progress task
  • Suggested user option to the super user when they are completing the tasks
  • provide skills to the users
  • providing skills and levels to tasks
  • admin panel for creation of task skills and levels ( we can add more features to the admin panel in future)

PRs needed to be merged

index that needed to be created

Real-Dev-Squad/website-backend#828

@vinayak-trivedi
Copy link
Member

vinayak-trivedi commented Nov 29, 2022

Things that are required to be done as per the latest suggestions

  • task assignment API can be improved in terms of reads (will be done in another PR, for now we can start using it issue ticket)
  • DB field should either be camelCase or there should be an underscore between two words (done)
  • Some minor changes in depaiyan's PR as per the suggestions given by Ankush (done)

ETA for completing all these: 30/11/2022

@ankushdharkar ankushdharkar pinned this issue Dec 10, 2022
@shreya-mishra shreya-mishra unpinned this issue Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend backlog enhancement New feature or request feature task A big ticket item that needs to come up as a feature frontend
Projects
None yet
Development

No branches or pull requests

5 participants