-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Fix bug recurring event #1738
Fix bug recurring event #1738
Conversation
Our Pull Request Approval ProcessWe have these basic policies to make the approval process smoother for our volunteer team. Testing Your CodePlease make sure your code passes all tests. Our test code coverage system will fail if these conditions occur:
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. ReviewersWhen your PR has been assigned reviewers contact them to get your code reviewed and approved via:
Reviewing Your CodeYour reviewer(s) will have the following roles:
CONTRIBUTING.mdRead our CONTRIBUTING.md file. Most importantly:
Other
|
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #1738 +/- ##
===========================================
+ Coverage 98.27% 98.39% +0.11%
===========================================
Files 205 203 -2
Lines 12511 12486 -25
Branches 1020 1021 +1
===========================================
- Hits 12295 12285 -10
+ Misses 184 171 -13
+ Partials 32 30 -2 ☔ View full report in Codecov by Sentry. |
@xoldyckk @EshaanAgg Can you review this PR? |
Use this for historical reference: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding the use of rruleString
in the Event schema
Wouldn't this be better represented by an RRULE object with the same structure as the JavaScript library?
Admin and mobile could use it too.
That way we can replace the package more easily in future in the function that translates between our objects and the underlying library.
The RRULE object can be generated from the rrulestring. I initially considered storing the object in the same format, but decided against it. This is because in monthly recurrence, we need to set events like 'last Monday' or 'second Monday. If necessary I can try to do the same |
It's supported in the object |
@palisadoes |
I'd assume entries for all the RRULE constructor parameters: |
Yes, whatever parameters you don't already have |
when saving all parameters we are getting it something like this Here, where 0 represents Monday and 4 represents the fourth occurrence (equivalent to RRule.MO.nth(4)), it becomes challenging to reuse the logic, as one has to rewrite it. Can We store the entire RRule object as a JSON string? |
OK. Start with that and let's see what the other reviewers say. |
Refer to this article. We definitely do not need to store all the bloated data that is being provided by the |
If we use RRULE then we have a lot of flexibility in not having to write code. I think it's necessary for the long term maintainability, new features and speed of implementation. I feel we are better off storing the parameters as a formal data structure to enforce compliance. The amount of overhead is low. There won't be billions of calendar entries per organization. We will be wasting time creating our own solution that has to be updated with each new recurrence idea. Are you in favor of storing the data in a structured format as I was hoping for earlier? |
Else can we store both rrule string + object? |
Storing the @Community-Programmer I presume the library that we are using should provide a method to generate all the events between the |
We'll need to handle and desired combination of months, days, and weeks:
We need to support any combination of options that Google Calendar and its competitors provide. The end user is going to expect that. We may not support it all now, but we will need to do so eventually. Making provisions for this at the very beginning will reduce the burden later on. |
yaa we do have these methods |
can you tell which file is unauthorized why this test is failing? |
Got it. @Community-Programmer It's your call now. I am against storing the whole RRule object for I feel the same to be highly bloated, but if it is necesary to support all the use cases and more that @palisadoes expressed above, then we can. Please explore the options for the same, including any alternative libraries that might not be as bulky. |
|
@EshaanAgg @palisadoes @xoldyckk |
Please proceed. |
If this ready for review? |
@Community-Programmer before code implementation writing a detailed plan with visual diagrams would be better, explaining the flow of a client sending a graphql http request, mutation user input validation, mutation CRUD business logic, query dynamic data generation, database models, their relationships and constraints etc. the bold italic highlighted parts are very important |
Yes It is prepared for mutation and schema review |
Some of that logic was provided here: |
|
|
@palisadoes if number of comments on a pull request is a problem, the discussions should be held in the issues or discussions tab, having discussions is a good thing this is a fairly complex feature request, that's why having discussions and finalizing on a general, easy to understand plan would be beneficial, the finalized plan has to be something easy to understand and reference for the reviewers when reviewing the PR, the reviewer can't scroll through the discussions to understand what has to be done in the PR I mentioned business logic and other entities because while reviewing the PR the reviewers can't keep the context of all that in their heads, they should have a finalized general initial plan to reference, especially for PRs that are huge in size figuring out mistakes after the code is implemented also leads to PRs with great number of comments because there's constant friction between what needed to be done and what was done, this is caused because of not having a general initial plan |
I completely agree with your comments.
I wanted to set expectations because this is a key priority feature. |
Do you require any other guidance? |
What should be my next step?? Should I have to create a general and finalized plan as @xoldyckk mentioned?? |
Yes, that would help |
Thanks in advance. We need this work to be completed as it's fixing a glaring omission in the basic expected functionality of all the API clients |
Closing as @Community-Programmer contacted me to say he won't have time to work on this for the next month. |
What kind of change does this PR introduce?
Fixed the bug on creating recurring event only single event is created
Issue Number:
Fixes #1583
Did you add tests for your changes?
yes
Snapshots/Videos:
2024-01-23.18-22-46.mp4
If relevant, did you update the documentation?
No
Summary
Implementation Details:
Validation:
No other functionalities is affected by changes made in the createEvent mutation
All test files passed
Does this PR introduce a breaking change?
Yes
Have you read the contributing guide?
Yes
PR related:
#1658
#1712