Skip to content

backend/fix:- added FromTime and toTime in Oznetel config#1190

Merged
prakharritik merged 1 commit intomainfrom
backend/fix/ozonetelConfig
Mar 26, 2026
Merged

backend/fix:- added FromTime and toTime in Oznetel config#1190
prakharritik merged 1 commit intomainfrom
backend/fix/ozonetelConfig

Conversation

@Kuldeepkumawat144
Copy link
Copy Markdown
Contributor

@Kuldeepkumawat144 Kuldeepkumawat144 commented Mar 26, 2026

Type of Change

  • [X ] Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates

Description

Additional Changes

  • This PR modifies the database schema (database migration added)
  • This PR modifies dhall configs/environment variables

Motivation and Context

How did you test it?

Checklist

  • I formatted the code and addressed linter errors ./dev/format-all-files.sh
  • I reviewed submitted code
  • I added unit tests for my changes where possible
  • I added a CHANGELOG entry if applicable

Summary by CodeRabbit

  • New Features
    • Configuration updated to replace a single expiry parameter with optional start/end times for time-based call scheduling, enabling precise scheduling windows.
    • Removed the previous expiry-only option to avoid overlap with the new scheduling window behavior.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a3952ea5-00c2-492f-8af8-55bf1d0ce838

📥 Commits

Reviewing files that changed from the base of the PR and between c8e4669 and 971ea63.

📒 Files selected for processing (1)
  • lib/mobility-core/src/Kernel/External/Call/Ozonetel/Config.hs
🚧 Files skipped from review as they are similar to previous changes (1)
  • lib/mobility-core/src/Kernel/External/Call/Ozonetel/Config.hs

Walkthrough

Removed expiryTime :: Maybe Text and added fromTime :: Maybe Text and toTime :: Maybe Text to the OzonetelCfg record in the Ozonetel external call configuration module.

Changes

Cohort / File(s) Summary
Ozonetel Configuration
lib/mobility-core/src/Kernel/External/Call/Ozonetel/Config.hs
Removed field expiryTime :: Maybe Text from OzonetelCfg; added fromTime :: Maybe Text and toTime :: Maybe Text as new optional fields. Derived instances will reflect the record shape change.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I nibble on the config, a tiny change in sight,
Out goes expiry, two time gates hop into the light,
From dawn to dusk they softly say hello,
A rabbit's twitch approves this gentle flow. 🐇✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title mentions adding 'FromTime and toTime' to Ozonetel config, which aligns with the actual changes. However, it fails to mention the removal of 'expiryTime' field, representing an incomplete summary of the structural change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch backend/fix/ozonetelConfig

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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@lib/mobility-core/src/Kernel/External/Call/Ozonetel/Config.hs`:
- Around line 31-33: OzonetelCfg adds fromTime, toTime and sosCampaignName but
addCampaignData in Client.hs doesn't propagate them; update addCampaignData to
read from OzonetelCfg (fields fromTime, toTime, sosCampaignName) and include
those values into the outgoing request payload/struct used to build the Ozonetel
API request (the same place other campaign fields are set), ensuring any Maybe
values are handled the same way as existing optional fields so they are
serialized only when present.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 29f6ad8d-cbc2-4281-9133-506e6e390bb9

📥 Commits

Reviewing files that changed from the base of the PR and between 03ef703 and c8e4669.

📒 Files selected for processing (1)
  • lib/mobility-core/src/Kernel/External/Call/Ozonetel/Config.hs

Comment on lines +31 to +33
fromTime :: Maybe Text,
toTime :: Maybe Text,
sosCampaignName :: Maybe Text,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

New config fields are added but currently not used in request flow

fromTime, toTime, and sosCampaignName are now part of OzonetelCfg, but in lib/mobility-core/src/Kernel/External/Call/Ozonetel/Client.hs (Line 35-54 context), addCampaignData does not read or propagate these values. If this PR is intended as a runtime bugfix, behavior will remain unchanged unless these fields are wired into the outgoing request construction path.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@lib/mobility-core/src/Kernel/External/Call/Ozonetel/Config.hs` around lines
31 - 33, OzonetelCfg adds fromTime, toTime and sosCampaignName but
addCampaignData in Client.hs doesn't propagate them; update addCampaignData to
read from OzonetelCfg (fields fromTime, toTime, sosCampaignName) and include
those values into the outgoing request payload/struct used to build the Ozonetel
API request (the same place other campaign fields are set), ensuring any Maybe
values are handled the same way as existing optional fields so they are
serialized only when present.

@Kuldeepkumawat144 Kuldeepkumawat144 force-pushed the backend/fix/ozonetelConfig branch from c8e4669 to 971ea63 Compare March 26, 2026 07:48
@prakharritik prakharritik merged commit 5cc4e89 into main Mar 26, 2026
2 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.

2 participants