Skip to content

[OSDEV-2244] Display ISIC 4 hierarchy fields on production location profiles#812

Merged
vlad-shapik merged 2 commits intomainfrom
OSDEV-2244-rba-taxonomy-display-new-isic-4-fields-on-the-ui
Nov 17, 2025
Merged

[OSDEV-2244] Display ISIC 4 hierarchy fields on production location profiles#812
vlad-shapik merged 2 commits intomainfrom
OSDEV-2244-rba-taxonomy-display-new-isic-4-fields-on-the-ui

Conversation

@vlad-shapik
Copy link
Contributor

@vlad-shapik vlad-shapik commented Nov 14, 2025

OSDEV-2244
Implemented frontend formatting for the ISIC 4 extended field to display Section, Division, Group, and Class as separate labeled entries, building the full ISIC 4 hierarchy on production location profile pages.

@vlad-shapik vlad-shapik self-assigned this Nov 14, 2025
@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 14, 2025 13:41 — with GitHub Actions Inactive
@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 14, 2025 13:41 — with GitHub Actions Inactive
@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 14, 2025 13:41 — with GitHub Actions Inactive
@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 14, 2025 13:41 — with GitHub Actions Inactive
@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 14, 2025 13:41 — with GitHub Actions Inactive
@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 14, 2025 13:41 — with GitHub Actions Inactive
@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 14, 2025 13:41 — with GitHub Actions Inactive
@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 14, 2025 13:41 — with GitHub Actions Inactive
@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 14, 2025 13:41 — with GitHub Actions Inactive
@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 14, 2025 13:41 — with GitHub Actions Inactive
@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 14, 2025 13:41 — with GitHub Actions Inactive
@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 14, 2025 13:41 — with GitHub Actions Inactive
@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 14, 2025 13:41 — with GitHub Actions Inactive
@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 14, 2025 13:41 — with GitHub Actions Inactive
@vlad-shapik vlad-shapik requested review from VadimKovalenkoSNF and roman-stolar and removed request for VadimKovalenkoSNF November 14, 2025 13:41
@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 14, 2025 13:44 — with GitHub Actions Inactive
@barecheck
Copy link

barecheck bot commented Nov 14, 2025

React App | Jest test suite - Code coverage report

Total: 37.19%

Your code coverage diff: 0.01% ▴

✅ All code changes are covered

@coderabbitai
Copy link

coderabbitai bot commented Nov 14, 2025

📝 Walkthrough

Walkthrough

Added support for displaying ISIC 4 hierarchical field data (Section, Division, Group, Class) on production location profile pages through a new extended field type with formatted display logic, including accompanying test coverage and release documentation.

Changes

Cohort / File(s) Summary
Documentation
doc/release/RELEASE-NOTES.md
Added new release note entry describing frontend formatting for ISIC 4 extended field, detailing hierarchical display of Section, Division, Group, and Class on production location profile pages.
Testing
src/react/src/__tests__/components/FacilityDetailsGeneralFields.test.js
Extended mock data with complete ISIC 4 extended field entry containing section, division, group, and class values; added new test asserting presence and formatting of ISIC 4 field components.
Constants Configuration
src/react/src/util/constants.jsx
Added new ISIC 4 entry to EXTENDED_FIELD_TYPES constant with fieldName: isic_4 and formatValue function that transforms hierarchical object into formatted string array (e.g., "Section: X", "Division: Y").

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • All changes follow consistent patterns established by existing extended field types
  • Formatting logic is straightforward with no complex conditional branching or error handling
  • Test addition is minimal and directly corresponds to the new constant entry

Possibly related PRs

Suggested reviewers

  • mazursasha1990
  • VadimKovalenkoSNF
  • roman-stolar
  • Innavin369

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding ISIC 4 hierarchy field display on production location profiles, matching the primary objective of the PR.
Description check ✅ Passed The description is directly related to the changeset, explaining the implementation of ISIC 4 frontend formatting with specific details about how the fields are displayed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch OSDEV-2244-rba-taxonomy-display-new-isic-4-fields-on-the-ui

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

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

🧹 Nitpick comments (3)
src/react/src/__tests__/components/FacilityDetailsGeneralFields.test.js (2)

160-179: Good fixture for ISIC 4; consider a partial-data case.

Optional: add a case where one or more of section/division/group/class are missing to confirm filtered output renders without gaps.


400-408: ISIC 4 render test looks solid; add flag-agnostic assertion (optional).

Since ISIC 4 isn’t an additional identifier, optionally assert it renders when show_additional_identifiers is false to guard regressions.

src/react/src/util/constants.jsx (1)

1130-1140: Nice, robust formatter for ISIC 4.

Alias for class avoids reserved word; filter(Boolean) handles missing parts; array return aligns with other field formatters. Consider adding a brief comment noting expected value shape { section, division, group, class } for future contributors.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d918dfe and d6f8fa8.

📒 Files selected for processing (3)
  • doc/release/RELEASE-NOTES.md (1 hunks)
  • src/react/src/__tests__/components/FacilityDetailsGeneralFields.test.js (2 hunks)
  • src/react/src/util/constants.jsx (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2024-11-26T04:59:12.296Z
Learnt from: VadimKovalenkoSNF
Repo: opensupplyhub/open-supply-hub PR: 420
File: doc/release/RELEASE-NOTES.md:38-38
Timestamp: 2024-11-26T04:59:12.296Z
Learning: For endpoints that haven't been released to end users, it's acceptable to document API changes under the 'Bugfix' section in the release notes.

Applied to files:

  • doc/release/RELEASE-NOTES.md
📚 Learning: 2025-06-02T13:24:57.659Z
Learnt from: VadimKovalenkoSNF
Repo: opensupplyhub/open-supply-hub PR: 641
File: doc/release/RELEASE-NOTES.md:6-35
Timestamp: 2025-06-02T13:24:57.659Z
Learning: The Open Supply Hub team keeps placeholders in release notes until code freeze, then fills in the actual content once all changes are finalized for the release.

Applied to files:

  • doc/release/RELEASE-NOTES.md
📚 Learning: 2024-12-10T07:09:35.641Z
Learnt from: VadimKovalenkoSNF
Repo: opensupplyhub/open-supply-hub PR: 436
File: src/react/src/components/Contribute/ProductionLocationDialog.jsx:33-181
Timestamp: 2024-12-10T07:09:35.641Z
Learning: In the `ProductionLocationDialog.jsx` component, hardcoded facility data is acceptable for now as per the project's requirements.

Applied to files:

  • src/react/src/__tests__/components/FacilityDetailsGeneralFields.test.js
📚 Learning: 2025-01-17T16:12:18.285Z
Learnt from: Innavin369
Repo: opensupplyhub/open-supply-hub PR: 483
File: src/react/src/__tests__/components/SearchByNameAndAddressSuccessResult.test.js:0-0
Timestamp: 2025-01-17T16:12:18.285Z
Learning: In the SearchByNameAndAddressSuccessResult component's tests, attempting to test internal navigation logic through mocking useHistory is not feasible, and button presence/click events should be covered in the main rendering test case.

Applied to files:

  • src/react/src/__tests__/components/FacilityDetailsGeneralFields.test.js
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (13)
  • GitHub Check: run-eslint-linter-and-prettier-formatter
  • GitHub Check: run-dd-code-quality
  • GitHub Check: get-base-branch-django-cov
  • GitHub Check: run-flake8-linter
  • GitHub Check: run-django-code-quality
  • GitHub Check: get-base-branch-countries-cov
  • GitHub Check: run-integration-test-code-quality
  • GitHub Check: get-base-branch-contricleaner-cov
  • GitHub Check: get-base-branch-dd-cov
  • GitHub Check: run-contricleaner-code-quality
  • GitHub Check: run-countries-code-quality
  • GitHub Check: run-fe-code-quality
  • GitHub Check: get-base-branch-fe-cov
🔇 Additional comments (1)
doc/release/RELEASE-NOTES.md (1)

14-14: LGTM: clear “What’s new” entry for ISIC 4 formatting.

Reads well and matches the implemented FE behavior. No action needed.

@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 14, 2025 13:53 — with GitHub Actions Inactive
@barecheck
Copy link

barecheck bot commented Nov 14, 2025

Dedupe Hub App | Unittest test suite - Code coverage report

Total: 55.73%

Your code coverage diff: 0.00% ▴

✅ All code changes are covered

@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 14, 2025 13:54 — with GitHub Actions Inactive
@barecheck
Copy link

barecheck bot commented Nov 14, 2025

Contricleaner App | Unittest test suite - Code coverage report

Total: 98.75%

Your code coverage diff: 0.00% ▴

✅ All code changes are covered

@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 14, 2025 13:54 — with GitHub Actions Inactive
@barecheck
Copy link

barecheck bot commented Nov 14, 2025

Countries App | Unittest test suite - Code coverage report

Total: 100%

Your code coverage diff: 0.00% ▴

✅ All code changes are covered

@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 17, 2025 10:50 — with GitHub Actions Inactive
@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 17, 2025 10:50 — with GitHub Actions Inactive
@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 17, 2025 10:50 — with GitHub Actions Inactive
@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 17, 2025 10:50 — with GitHub Actions Inactive
@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 17, 2025 10:50 — with GitHub Actions Inactive
@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 17, 2025 10:50 — with GitHub Actions Inactive
@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 17, 2025 10:50 — with GitHub Actions Inactive
@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 17, 2025 10:50 — with GitHub Actions Inactive
@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 17, 2025 10:50 — with GitHub Actions Inactive
@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 17, 2025 10:50 — with GitHub Actions Inactive
@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 17, 2025 10:50 — with GitHub Actions Inactive
@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 17, 2025 10:50 — with GitHub Actions Inactive
@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 17, 2025 10:50 — with GitHub Actions Inactive
@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 17, 2025 10:50 — with GitHub Actions Inactive
@sonarqubecloud
Copy link

@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 17, 2025 10:53 — with GitHub Actions Inactive
@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 17, 2025 11:02 — with GitHub Actions Inactive
Copy link
Contributor

@roman-stolar roman-stolar left a comment

Choose a reason for hiding this comment

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

LGTM

@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 17, 2025 11:03 — with GitHub Actions Inactive
@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 17, 2025 11:03 — with GitHub Actions Inactive
@vlad-shapik vlad-shapik temporarily deployed to Quality Environment November 17, 2025 11:12 — with GitHub Actions Inactive
Copy link
Contributor

@VadimKovalenkoSNF VadimKovalenkoSNF left a comment

Choose a reason for hiding this comment

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

Approved.

@vlad-shapik vlad-shapik merged commit 090f56b into main Nov 17, 2025
21 checks passed
@vlad-shapik vlad-shapik deleted the OSDEV-2244-rba-taxonomy-display-new-isic-4-fields-on-the-ui branch November 17, 2025 11:44
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.

4 participants