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

Public tasks -- updates to ensure public tasks can be viewed and used #1581

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

ihsaan-ullah
Copy link
Collaborator

@ihsaan-ullah ihsaan-ullah commented Sep 13, 2024

@ mention of reviewers

@Didayolo

A brief description of the purpose of the changes contained in this PR.

This PR solves all the issues related to making tasks public and using them in competitions either by owners or other users. The following changes are made to enable this functionality.

  1. From Task model, condition removed that forced tasks to be validated first before making them public
  2. Fron-end updated to show making a task public/private button. There was a condition to show this button only when a task is validated. Now that is removed
  3. Updated task update method on the backend to enable updating is_public status of a task.
  4. Task updation was never tested and there was a problem in the response of the update API. Now that is fixed and the API returns a serialized response to show updated status.
  5. Removed key from the task detail serializer. In the task detail, there was always key present. That was not needed and is now removed
  6. Some modifications were needed in TaskListSerializer to properly use validated status and sharedwith list. Now that is fixed.
  7. Added is_public to TaskListSerializer to show a checkmark in the tasks list table.
  8. Public tasks were shown in the tasks interface when a checkbox Show public tasks was checked but when this public task was clicked, details were not shown because it was not permitted from the backend. Now the backend is updated to return details for public tasks.
  9. When you edit a competition->phase from the UI, public tasks were not shown in the tasks list, now users can see and select public tasks in their phases

Issues this PR resolves

A checklist for hand testing

  • With user 1 create a task and make it public using the task detail interface. Make sure that you can make the task public and private
  • With user 2 go to Resource interface -> Tasks tab, click show public tasks checkbox. Check that the task made public by user 1 is shown here. Check that you can click the task and check its details
  • With user 2 create a competition, go to edit competition->Phases. In one phase search the same task in the task dropdown and check that you can select this task for your phase and save changes.
  • Now run a submission to check that the task works.
  • check that only owners of tasks can make them public/private

Checklist

  • Code review by me
  • Hand tested by me
  • I'm proud of my work
  • Code review by reviewer
  • Hand tested by reviewer
  • CircleCi tests are passing
  • Ready to merge

…g task public/private buttion. Updated task update method to enable updating is_public status. Once a task is_public was updated, the response was not serialized, now fixed. Removed key from the task detail serializer. Modified validated and shared with methods to return correct responses. Added is_public to TaskListSerializer to show checkmark in the tasks list table.
@ihsaan-ullah
Copy link
Collaborator Author

ihsaan-ullah commented Sep 14, 2024

Documentation


How to make a task public

How to search public tasks

How to use a public task in your competition

@ihsaan-ullah ihsaan-ullah linked an issue Sep 14, 2024 that may be closed by this pull request
@Didayolo Didayolo self-assigned this Sep 16, 2024
@ihsaan-ullah
Copy link
Collaborator Author

@Didayolo this PR is ready for review. Please ignore the documentation comment, I will complete the documentation later when other task related features are added.

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 this pull request may close these issues.

Public Tasks
2 participants