Skip to content

Add Total Questions Solved Field in Workflow #21

@jagdish-15

Description

@jagdish-15

Currently, the leaderboard data includes solved counts for Easy, Medium, and Hard problems, but does not include a total number of problems solved.
To improve data usability (e.g., for sorting and display), we should compute and include a totalSolved field for each user in the workflow that generates leaderboard data.

Expected Behaviour

  • Each user object should include a new field: totalSolved
  • totalSolved should be calculated as: easySolved + mediumSolved + hardSolved
  • This field should be present in:
    • data/overall.json
    • data/daily.json
    • data/weekly.json
    • data/monthly.json
  • totalSolved should be recalculated after daily/weekly/monthly progress calculations
  • Do not modify historical files inside the data/daily/ directory or the logic that generates them
  • This is the file that will need to be updated for this

Example

Before:

{
  "name": "Harshad Bhalsing",
  "id": "harsh-0_2",
  "data": {
    "easySolved": 1,
    "mediumSolved": 7,
    "hardSolved": 2
  },
  "score": 32
}

After:

{
  "name": "Harshad Bhalsing",
  "id": "harsh-0_2",
  "data": {
    "easySolved": 1,
    "mediumSolved": 7,
    "hardSolved": 2,
    "totalSolved": 10
  },
  "score": 32
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    BackendTask mainly involving backendDifficulty: MediumIndicates the difficultyenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions