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

feat: Add support for Action Items #1648

Merged
merged 35 commits into from
Jan 28, 2024

Conversation

meetulr
Copy link

@meetulr meetulr commented Jan 7, 2024

Fixes #1595

Did you add tests for your changes?

Yes

Summary

This pull request introduces the following changes:

  1. Support for Categories: Create, Read, and Update (CRU) operations have been added for Categories. This feature is accessible to superAdmins and orgAdmins.
  2. Support for Action Items: Create, Read, Update, and Delete (CRUD) operations have been added for Action Items. This feature is accessible to superAdmins, orgAdmins, and eventAdmins.
  3. Category-Organization Relationship: A two-way relationship has been established between Categories and Organizations. A default Category is automatically created and associated with each newly created Organization. Additionally, any new Categories created are automatically associated with the corresponding Organization.
  4. ActionItem-Event Relationship: A two-way relationship has been established between Action Items and Events. If an Action Item is associated with an Event, it is automatically added to that Event. If an Action Item is deleted, it is automatically removed from the associated Event. Furthermore, if an Event is deleted, all associated Action Items are also deleted.
  5. Organization Cascade Delete Functionality: Upon deletion of an Organization, all Categories associated with the Organization, as well as all Action Items associated with those Categories, are automatically deleted.
  6. Comprehensive Testing: Tests have been added to ensure full coverage for all newly added or modified files.

Does this PR introduce a breaking change?

No

Have you read the contributing guide?

Yes

Copy link

github-actions bot commented Jan 7, 2024

Our Pull Request Approval Process

We have these basic policies to make the approval process smoother for our volunteer team.

Testing Your Code

Please make sure your code passes all tests. Our test code coverage system will fail if these conditions occur:

  1. The overall code coverage drops below the target threshold of the repository
  2. Any file in the pull request has code coverage levels below the repository threshold
  3. Merge conflicts

The process helps maintain the overall reliability of the code base and is a prerequisite for getting your PR approved. Assigned reviewers regularly review the PR queue and tend to focus on PRs that are passing.

Reviewers

When your PR has been assigned reviewers contact them to get your code reviewed and approved via:

  1. comments in this PR or
  2. our slack channel

Reviewing Your Code

Your reviewer(s) will have the following roles:

  1. arbitrators of future discussions with other contributors about the validity of your changes
  2. point of contact for evaluating the validity of your work
  3. person who verifies matching issues by others that should be closed.
  4. person who gives general guidance in fixing your tests

CONTRIBUTING.md

Read our CONTRIBUTING.md file. Most importantly:

  1. PRs with issues not assigned to you will be closed by the reviewer
  2. Fix the first comment in the PR so that each issue listed automatically closes

Other

  1. 🎯 Please be considerate of our volunteers' time. Contacting the person who assigned the reviewers is not advised unless they ask for your input. Do not @ the person who did the assignment otherwise.
  2. Read the CONTRIBUTING.md file make

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulations on making your first PR! 🎊 If you haven't already, check out our Contributing Guidelines and PR Reporting Guidelines to ensure that you are following our guidelines for contributing and creating PR.

@meetulr
Copy link
Author

meetulr commented Jan 7, 2024

I've had fun implementing this. Let me know if any changes are required, or if I've missed anything.
Thanks.

@palisadoes
Copy link
Contributor

Just to confirm, did you implement Action Items related to Events and to Users independent of events?

@palisadoes palisadoes requested a review from DMills27 January 7, 2024 16:01
@meetulr
Copy link
Author

meetulr commented Jan 7, 2024

Just to confirm, did you implement Action Items related to Events and to Users independent of events?

I only restricted the assignment of an action item to organization members. That means even if the action item is associated with an event, it could be assigned to a user regardless them not being involved with the event, they just have to be a member of the organization.

@palisadoes palisadoes requested a review from xsh2047 January 7, 2024 16:04
Copy link

codecov bot commented Jan 7, 2024

Codecov Report

Attention: 60 lines in your changes are missing coverage. Please review.

Comparison is base (c0468a4) 98.17% compared to head (9577a59) 98.37%.
Report is 195 commits behind head on develop.

Files Patch % Lines
src/resolvers/Mutation/updateUserProfile.ts 70.90% 1 Missing and 15 partials ⚠️
src/resolvers/Mutation/createEvent.ts 83.51% 13 Missing and 2 partials ⚠️
src/resolvers/middleware/currentUserExists.ts 45.83% 13 Missing ⚠️
src/resolvers/Mutation/createPost.ts 90.32% 6 Missing ⚠️
src/resolvers/Mutation/createOrganization.ts 95.78% 4 Missing ⚠️
src/resolvers/Mutation/removeAdvertisement.ts 92.85% 2 Missing ⚠️
...c/resolvers/Query/postsByOrganizationConnection.ts 33.33% 2 Missing ⚠️
src/helpers/eventInstances/weekly.ts 98.11% 1 Missing ⚠️
src/resolvers/Query/postsByOrganization.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1648      +/-   ##
===========================================
+ Coverage    98.17%   98.37%   +0.19%     
===========================================
  Files          184      225      +41     
  Lines        10767    13630    +2863     
  Branches       835     1141     +306     
===========================================
+ Hits         10571    13409    +2838     
- Misses         186      189       +3     
- Partials        10       32      +22     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@meetulr meetulr changed the title Add support for Action Items feat: Add support for Action Items Jan 8, 2024
@palisadoes
Copy link
Contributor

Please review

@meetulr
Copy link
Author

meetulr commented Jan 9, 2024

Let me know if there are any redundancies, with any queries, or in mongoose schemas.

@palisadoes
Copy link
Contributor

@meetulr

  1. Let us know when this is ready to be reviewed.
  2. Mark the comments that have been rectified as being resolved

@meetulr
Copy link
Author

meetulr commented Jan 22, 2024

@meetulr

  1. Let us know when this is ready to be reviewed.
  2. Mark the comments that have been rectified as being resolved

I've made all the requested changes.

@palisadoes palisadoes requested a review from EshaanAgg January 22, 2024 15:57
@palisadoes
Copy link
Contributor

This is ready for review. Please take a look.

  1. @xoldyckk
  2. @sumitra19jha
  3. @DMills27
  4. @xsh2047
  5. @JamaicanFriedChicken
  6. @EshaanAgg

@meetulr meetulr requested a review from xoldd January 26, 2024 16:24
@meetulr
Copy link
Author

meetulr commented Jan 27, 2024

This is a sandbox demo for the changes I made:

  1. For Action Item Categories:
actionItemCategory.mp4
  1. For Action Items:
actionItems.mp4
  1. Cascade deletion:
cascadeDeletion.mp4

@SiddheshKukade
Copy link
Member

I'll test it out and let you know.

@meetulr
Copy link
Author

meetulr commented Jan 27, 2024

This is a sandbox demo for the changes I made:

  1. For Action Item Categories:

actionItemCategory.mp4
2. For Action Items:

actionItems.mp4

@xoldyckk
@sumitra19jha
@EshaanAgg
@DMills27
@JamaicanFriedChicken

The frontend for this is now in development, any changes made/required here would have an impact there too.

Please take a look!😅
Thank you.

@meetulr
Copy link
Author

meetulr commented Jan 27, 2024

I'll test it out and let you know.

Thank you!

Copy link
Contributor

@EshaanAgg EshaanAgg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor suggestion.

src/models/ActionItem.ts Outdated Show resolved Hide resolved
@meetulr
Copy link
Author

meetulr commented Jan 28, 2024

Just a minor suggestion.

Thank you! I've made the change, and I'll keep that in mind.

@meetulr meetulr requested a review from EshaanAgg January 28, 2024 08:40
@palisadoes
Copy link
Contributor

@EshaanAgg please review the updates

@palisadoes palisadoes merged commit de4debc into PalisadoesFoundation:develop Jan 28, 2024
9 of 10 checks passed
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.

6 participants