Skip to content

Conversation

@naveenr-egov
Copy link

@naveenr-egov naveenr-egov commented Dec 16, 2025

Choose the appropriate template for your PR:

Feature/Bugfix Request

JIRA ID

Module

Description

Summary by CodeRabbit

  • Style
    • Updated date formatting throughout inventory management to display abbreviated month names (e.g., "Jan") instead of full month names for stock expiry and entry dates.

✏️ Tip: You can customize this high-level summary in your review settings.

@naveenr-egov naveenr-egov requested a review from a team as a code owner December 16, 2025 11:50
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 16, 2025

📝 Walkthrough

Walkthrough

Date formatting strings were updated in the inventory configuration file. Two date display fields now use abbreviated month names (MMM) instead of full month names (MMMM) and adjusted the date format parameter. No logic or control flow changes were introduced.

Changes

Cohort / File(s) Summary
Date Format Updates
health/configs/Data/INVENTORY.MR-DN
Modified date formatting for STOCK_EXPIRY and dateOfEntry fields: replaced formatDate(..., dateTime, dd MMMM yyyy) with formatDate(..., 'date', dd MMM yyyy) to use abbreviated month names

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A date wore its long gown, now trimmed short with grace,
From "December" to "Dec"—a simpler, cleaner face!
Two fields got the snip, MMMM to MMM so bright,
Inventory looks tidier now—doesn't it feel right? ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description contains only template placeholders without actual content; JIRA ID, Module, and Description fields are unfilled. Complete the description by providing the JIRA ID, specifying the impacted module, and detailing why this date formatting change was necessary.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change—updating date formatting in a specific configuration file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch date-format-config-update

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
Contributor

@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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 796a18c and 3c1b29e.

📒 Files selected for processing (1)
  • health/configs/Data/INVENTORY.MR-DN (2 hunks)
⏰ Context from checks skipped due to timeout of 10000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Analyze (actions)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (1)
health/configs/Data/INVENTORY.MR-DN (1)

973-973: Same date formatting change applied consistently.

This change mirrors the update on line 869, applying the same abbreviated month format (MMM) and 'date' parameter. The consistency across both locations is good, though the same syntax concerns regarding the unquoted format pattern apply here as well.

{
"key": "STOCK_EXPIRY",
"value": "{{fn:formatDate(item.additionalFields.fields.expiryDate, dateTime, dd MMMM yyyy)}}"
"value": "{{fn:formatDate(item.additionalFields.fields.expiryDate, 'date', dd MMM yyyy)}}"
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Search for formatDate function definition and usage patterns

echo "=== Searching for formatDate in config files ==="
rg -l 'formatDate' --type json . | head -10

echo -e "\n=== Looking for INVENTORY.MR-DN file and similar patterns ==="
find . -name "*.MR-DN" -o -name "*INVENTORY*" | head -20

echo -e "\n=== Checking for formatDate function definitions ==="
rg -n 'formatDate\s*[:(]' --type js --type ts | head -20

Repository: egovernments/DIGIT-Frontend

Length of output: 769


🏁 Script executed:

#!/bin/bash
# Search for formatDate usage in config files and get more context

echo "=== Searching for all formatDate usage in config files ==="
rg 'formatDate' health/configs/Data/ -B 1 -A 1 | head -50

echo -e "\n=== Reading INVENTORY.MR-DN around line 869 ==="
sed -n '860,880p' health/configs/Data/INVENTORY.MR-DN

echo -e "\n=== Reading INVENTORY.MR-DN around line 973 ==="
sed -n '965,985p' health/configs/Data/INVENTORY.MR-DN

echo -e "\n=== Searching for formatDate function in entire codebase ==="
rg 'formatDate\s*=' --type js --type ts --type jsx --type tsx -A 3 | head -40

Repository: egovernments/DIGIT-Frontend

Length of output: 7719


Quote the format pattern dd MMM yyyy to match the correct syntax used elsewhere in the codebase.

The format pattern in the third parameter should be a string literal. Compare with STOCKREPORTS.MR-DN, which correctly uses 'dd MMM yyyy' (quoted). INVENTORY.MR-DN lines 869 and 973 have the format pattern unquoted, which is inconsistent with established patterns in the configuration files.

Correct syntax:

"value": "{{fn:formatDate(item.additionalFields.fields.expiryDate, 'date', 'dd MMM yyyy')}}"
🤖 Prompt for AI Agents
In health/configs/Data/INVENTORY.MR-DN around lines 869 (and also check line
973), the date format pattern dd MMM yyyy is unquoted; update the third argument
to be a string literal by surrounding the pattern with quotes (i.e., 'dd MMM
yyyy') so the call becomes fn:formatDate(..., 'date', 'dd MMM yyyy'); ensure
both occurrences are fixed to match the quoted pattern used elsewhere.

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