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

added boundary fix #1339

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3170,7 +3170,7 @@ const autoGenerateBoundaryCodes = async (
latLongData = result.latLongData;
boundaryData = result.updatedData;
}
const updatedBoundaryData = updateBoundaryData(boundaryData, hierarchy);
const updatedBoundaryData = updateBoundaryData(boundaryData, localizedHeadersOfBoundarySheet);
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

The change introduces a bug in boundary data processing

Using localizedHeadersOfBoundarySheet instead of hierarchy in updateBoundaryData will break the key filtering logic. The function expects the hierarchy parameter to match the actual keys in boundaryData, but localized headers won't match these keys, resulting in no data being processed.

  • Line 3173: Revert to using the original hierarchy array in updateBoundaryData(boundaryData, hierarchy)
🔗 Analysis chain

LGTM! The change improves localization support.

The replacement of hierarchy with localizedHeadersOfBoundarySheet in the updateBoundaryData function call correctly integrates with the localization system, ensuring boundary data is processed using localized headers.

Run the following script to verify the localization integration:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that the localization system is properly integrated with boundary data processing.
# Test: Search for localization-related function calls and their usage with boundary data.

# Check for localization function usage
rg -A 5 "getLocalizedHeaders.*boundarySheet|updateBoundaryData.*localizedHeaders"

# Check for boundary data processing with localization
ast-grep --pattern 'updateBoundaryData($_, $localizedHeadersOfBoundarySheet)'

Length of output: 779


Script:

#!/bin/bash
# Find the declaration and initialization of localizedHeadersOfBoundarySheet
rg -B 5 "localizedHeadersOfBoundarySheet\s*=" 

# Find the implementation of updateBoundaryData function
ast-grep --pattern 'function updateBoundaryData($params) {
  $$$
}'

Length of output: 778


Script:

#!/bin/bash
# Find the complete implementation of updateBoundaryData
rg -B 2 -A 10 "function updateBoundaryData"

Length of output: 2719

const modifiedBoundaryData = modifyBoundaryDataHeaders(
updatedBoundaryData,
hierarchy,
Expand Down
Loading