Skip to content

Fix Farmer Registry - #850

Merged
gonzalesedwin1123 merged 7 commits into
17.0from
fix-farmer
Oct 8, 2025
Merged

gonzalesedwin1123 merged 7 commits into
17.0from
fix-farmer

Conversation

@emjay0921

Copy link
Copy Markdown
Contributor

Why is this change needed?

Fix the problem on National ID and Roles

How was the change implemented?

Remove the National ID on Farmer Registry, and move the Roles to Common Base Module

New unit tests

None

Unit tests executed by the author

None

How to test manually

Related links

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @emjay0921, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refactors core data management within the system by addressing issues with National ID and Roles. The 'National ID' functionality has been entirely removed from the Farmer Registry module to simplify its data structure. Concurrently, 'Roles' definitions have been migrated to a common base module, enhancing the overall modularity and organization of the application's foundational components.

Highlights

  • National ID Removal: The 'National ID' field and all associated logic, including its definition, usage in forms, data handling, and related unit tests, have been completely removed from the Farmer Registry module (spp_base_farmer_registry). This streamlines the farmer data model by eliminating this specific identifier.
  • Roles Module Relocation: The definitions for 'Global Roles' and 'Local Roles' (XML files) have been moved from the spp_base_spmis module to the spp_base_common module. This centralizes role management within a more foundational base module, improving modularity and dependency management.
  • Manifest Updates: Module manifests (__manifest__.py files) have been updated across spp_base_common, spp_base_farmer_registry, and spp_base_spmis to reflect the removal of id_data.xml and the relocation of the role definition XML files.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request effectively removes the 'National ID' functionality from the farmer registry and centralizes role definitions into a common module, as described. The changes are well-executed across all relevant files, including models, views, tests, and data, ensuring a clean refactoring. The code quality is high, and the changes align perfectly with the stated objectives. I have one suggestion to improve code consistency.

Comment thread spp_base_common/__manifest__.py Resolved
@sonarqubecloud

sonarqubecloud Bot commented Oct 8, 2025

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot
9.2% Duplication on New Code (required ≤ 3%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@emjay0921

Copy link
Copy Markdown
Contributor Author

This can be merge now as the fix for the test error here is already on #851.

CC @gonzalesedwin1123

@gonzalesedwin1123
gonzalesedwin1123 merged commit 25a80dc into 17.0 Oct 8, 2025
7 of 8 checks passed
@gonzalesedwin1123
gonzalesedwin1123 deleted the fix-farmer branch October 8, 2025 08:14
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants