Skip to content

feat : add data model for OOO request feature#77

Open
RishiChaubey31 wants to merge 5 commits intomainfrom
feat/ooo-request-schema
Open

feat : add data model for OOO request feature#77
RishiChaubey31 wants to merge 5 commits intomainfrom
feat/ooo-request-schema

Conversation

@RishiChaubey31
Copy link

@RishiChaubey31 RishiChaubey31 commented Aug 28, 2025

Date: 28-08-2025

Developer Name: Rishi Chaubey


Issue Ticket Number

Description

Documentation Updated?

  • Yes
  • No

Under Feature Flag

  • Yes
  • No

Database Changes

  • Yes
  • No

Breaking Changes

  • Yes
  • No

Development Tested?

  • Yes
  • No

Screenshots

Screenshot 1

Test Coverage

Screenshot 1

Additional Notes

@coderabbitai
Copy link

coderabbitai bot commented Aug 28, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Summary by CodeRabbit

  • Documentation
    • Updated public OOO Status request schema documentation.
    • Renamed fields: userId → requestedBy, state → status, lastUpdatedBy → lastModifiedBy.
    • Replaced/paired message with comment; introduced reason in examples where applicable.
    • Added new field: type (e.g., "OOO").
    • Clarified status enum values (PENDING | APPROVED | REJECTED).
    • Refreshed example payloads to reflect requestedBy, status, lastModifiedBy, comment, type, and preserved timestamps (createdAt/updatedAt).

Walkthrough

The README for the OOO Request Firestore model was updated to reflect a revised public JSON schema: several fields were renamed, a new type field was added, and example payloads were updated. Timing fields remain. No source code or control-flow changes are included.

Changes

Cohort / File(s) Summary
Docs — OOO Request schema
ooo-request/README.md
Updated public JSON schema and examples: userIdrequestedBy, statestatus, lastUpdatedBylastModifiedBy, messagecomment; added type field; examples now use requestedBy, status, lastModifiedBy, comment, type, with timing fields preserved and some examples using reason text.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

A bunny with a schema pen,
Renames hop from now to then—
requestedBy and status too,
comment, type, all shiny new.
lastModifiedBy winks in sight,
Docs aligned, the fields just right.
Thump-thump—release takes flight! 🐇✨

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/ooo-request-schema

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

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

I've completed my review and didn't find any issues... but I did find this penguin.

 __
( o>
///\
\V_/_

Check out our docs on how you can make Korbit work best for you and your team.

Loving Korbit!? Share us on LinkedIn Reddit and X

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
ooo-request/README.md (3)

37-37: Rename headings to “status” (field was renamed from state).

Keep terminology consistent with the schema.

Apply this diff:

-#### Example for PENDING state
+#### Example for PENDING status
-#### Example for APPROVED state
+#### Example for APPROVED status
-#### Example for REJECTED state
+#### Example for REJECTED status

Also applies to: 55-55, 73-73


1-16: Plan for backward compatibility and data migration.

Field renames impact queries, indexes, security rules, and any clients/functions expecting userId/state/lastUpdatedBy/message. Introduce a migration/backfill and transitional reads.

  • Keep old fields readable for a deprecation window or add a Cloud Function to backfill new fields on write.
  • Update Security Rules to reference requestedBy/status/lastModifiedBy.
  • Review Composite Indexes involving renamed fields.
  • Communicate the change with a versioned schema note in this README.

I can draft a migration checklist if helpful.

Also applies to: 24-34, 37-90


1-90: Replace deprecated userId with requestedBy in the REJECTED example and align legacy fields across the repo

  • In ooo-request/README.md (line 78), change "userId": "…" to "requestedBy": "…" to match the schema
  • Audit other modules for occurrences of userId, state, message, and lastUpdatedBy and update them to the current field names or ensure backward-compatibility
♻️ Duplicate comments (1)
ooo-request/README.md (1)

21-34: Minor style: add period after “etc.” and tighten phrasing.

LanguageTool flags this; the diff in the table comment above already addresses it.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 0d03546 and 5e58e64.

📒 Files selected for processing (1)
  • ooo-request/README.md (5 hunks)
🧰 Additional context used
🪛 LanguageTool
ooo-request/README.md

[grammar] ~24-~24: Use correct spacing
Context: ...d of the user who created the request. | | status | String | The sta...

(QB_NEW_EN_OTHER_ERROR_IDS_5)


[grammar] ~24-~24: Use correct spacing
Context: ...ho created the request. | | status | String | The state o...

(QB_NEW_EN_OTHER_ERROR_IDS_5)


[grammar] ~25-~25: There might be a mistake here.
Context: ...s | String | The state of the request like APPROVED, REJECTED, PENDING. | | f...

(QB_NEW_EN_OTHER)


[grammar] ~25-~25: Insert the missing word
Context: ...e of the request like APPROVED, REJECTED, PENDING. | | from | Timestamp ...

(QB_NEW_EN_OTHER_ERROR_IDS_32)


[grammar] ~26-~26: Use correct spacing
Context: ...for the start date of the OOO request. | | until | Timestamp | Unix ti...

(QB_NEW_EN_OTHER_ERROR_IDS_5)


[grammar] ~26-~26: Use correct spacing
Context: ...he start date of the OOO request. | | until | Timestamp | Unix timest...

(QB_NEW_EN_OTHER_ERROR_IDS_5)


[grammar] ~27-~27: Use correct spacing
Context: ...ate of the OOO request. | | until | Timestamp | Unix timestamp for the en...

(QB_NEW_EN_OTHER_ERROR_IDS_5)


[grammar] ~27-~27: Use correct spacing
Context: ...p for the end date of the OOO request. | | reason | String | The rea...

(QB_NEW_EN_OTHER_ERROR_IDS_5)


[grammar] ~27-~27: Use correct spacing
Context: ...he end date of the OOO request. | | reason | String | The reason ...

(QB_NEW_EN_OTHER_ERROR_IDS_5)


[grammar] ~28-~28: Use correct spacing
Context: ...tring | The reason for the request. | | createdAt | Timestamp | Unix ti...

(QB_NEW_EN_OTHER_ERROR_IDS_5)


[grammar] ~28-~28: Use correct spacing
Context: ...equest. | | createdAt | Timestamp | Unix timest...

(QB_NEW_EN_OTHER_ERROR_IDS_5)


[grammar] ~29-~29: Use correct spacing
Context: ... for the creation time of the request. | | updatedAt | Timestamp | Unix ti...

(QB_NEW_EN_OTHER_ERROR_IDS_5)


[grammar] ~29-~29: Use correct spacing
Context: ...he creation time of the request. | | updatedAt | Timestamp | Unix timest...

(QB_NEW_EN_OTHER_ERROR_IDS_5)


[grammar] ~30-~30: Use correct spacing
Context: ...r the last update time of the request. | | lastModifiedBy| String | The id ...

(QB_NEW_EN_OTHER_ERROR_IDS_5)


[grammar] ~30-~30: Use correct spacing
Context: ...he last update time of the request. | | lastModifiedBy| String | The id of t...

(QB_NEW_EN_OTHER_ERROR_IDS_5)


[grammar] ~31-~31: There might be a mistake here.
Context: ...ser who processed the request | | comment | String | The reason...

(QB_NEW_EN)


[grammar] ~32-~32: Use correct spacing
Context: ...e reason for the APPROVED or REJECTED. | | type | String | The typ...

(QB_NEW_EN_OTHER_ERROR_IDS_5)


[grammar] ~32-~32: Use correct spacing
Context: ...PPROVED or REJECTED. | | type | String | The type of...

(QB_NEW_EN_OTHER_ERROR_IDS_5)


[grammar] ~33-~33: There might be a mistake here.
Context: ...| String | The type of request being sent like OOO, Onboarding etc | ### Exam...

(QB_NEW_EN_OTHER)


[style] ~33-~33: In American English, abbreviations like “etc.” require a period.
Context: ...request being sent like OOO, Onboarding etc | ### Example data #### Example fo...

(ETC_PERIOD)


[grammar] ~33-~33: There might be a problem here.
Context: ...uest being sent like OOO, Onboarding etc | ### Example data #### Example for PENDING s...

(QB_NEW_EN_MERGED_MATCH)

🔇 Additional comments (2)
ooo-request/README.md (2)

60-70: Approved example looks consistent with the new schema.


26-27: Consider aligning the “Timestamp” type label with actual representation.

Examples use Unix epoch milliseconds (Number). If that’s the contract, label the Type as Number (ms since epoch) to avoid confusion with Firestore’s Timestamp object.

Do you want me to update the table/types accordingly?

Also applies to: 29-30

@MayankBansal12
Copy link
Member

@RishiChaubey31 Please improve PR title

RishiChaubey31 and others added 3 commits August 29, 2025 23:50
Co-authored-by: Mayank Bansal <mayankbansal125@gmail.com>
Co-authored-by: Mayank Bansal <mayankbansal125@gmail.com>
@RishiChaubey31 RishiChaubey31 changed the title feature : updation of OOO (out-of-office) request schema feat : add data model for OOO request feature Aug 30, 2025
| id | String | Unique identifier for the document. |
| userId | String | The id of the user who created the request. |
| state | String | The state of the request like APPROVED, REJECTED, PENDING. |
| requestedBy | String | UID of the user who created the request. |

Choose a reason for hiding this comment

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

  • what is UID

Copy link
Author

Choose a reason for hiding this comment

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

unique ID of the user creating the request

"comment": "String | null",
"createdAt": "Timestamp",
"requestedBy":"String",
"updatedAt": "Timestamp",

Choose a reason for hiding this comment

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

updatedAt type will be also "Timestamp | null"

Copy link
Member

Choose a reason for hiding this comment

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

please confirm if updatedAt is null during creation, if yes then use null here

Copy link
Author

Choose a reason for hiding this comment

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

No updatedAt is not null during creation

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.

User OOO Management

3 participants