Skip to content

Conversation

@reichie020212
Copy link
Member

@reichie020212 reichie020212 commented Nov 11, 2025

Why is this change needed?

  • Name sequence of change request is executed twice resulting to name sequence increased by 2
  • e.g. CR-2025-000010, CR-2025-000012, CR-2025-000014

How was the change implemented?

  • Deleted the duplicate override of create method

New unit tests

  • none

Unit tests executed by the author

  • none

How to test manually

  • Create a new Change request
  • Take note of the last two digit of the Change Request's name (e.g. CR-2025-000010)
  • Create again a new Change request
  • The last two digit of the second change request should only be increased by 1. (e.g CR-2025-000011)

Related links


Note

Removes the duplicate create override in spp_change_request/models/change_request.py that set defaults and created a pending validation activity.

  • Backend
    • ChangeRequestBase (spp_change_request/models/change_request.py): Remove overridden create method that:
      • Defaulted assign_to_id to current user
      • Generated name from ir.sequence
      • Created a "pending validation" activity

Written by Cursor Bugbot for commit bac619f. This will update automatically on new commits. Configure here.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @reichie020212, 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 addresses a bug where Change Request (CR) sequence numbers were incrementing by two due to a redundant create method override. The fix involves removing this duplicate method, ensuring that new CRs are assigned sequential numbers correctly. This streamlines the CR creation process and maintains data integrity for naming conventions.

Highlights

  • Duplicate create method removed: This pull request removes a redundant create method override from spp_change_request/models/change_request.py that was inadvertently causing the change request naming sequence to increment by two instead of the expected one.
  • Corrected Change Request Naming Sequence: The removal of the duplicate create method ensures that new change requests will now receive sequential numbers, resolving the issue of skipped numbers (e.g., CR-2025-000010, CR-2025-000012) and ensuring proper numbering (e.g., CR-2025-000010, CR-2025-000011).
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.

Copy link
Contributor

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

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 correctly addresses the issue of the change request sequence being incremented twice upon creation. The root cause was a duplicated create method in the spp.change.request model (within the spp_change_request module), which was an exact copy of the parent method in the spp_change_request_base module. By removing this redundant override, the code is simplified, maintainability is improved, and the bug is resolved. The change is clean and effective.

@sonarqubecloud
Copy link

@codecov
Copy link

codecov bot commented Nov 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.81%. Comparing base (9f54353) to head (bac619f).

Additional details and impacted files
@@            Coverage Diff             @@
##             17.0     #868      +/-   ##
==========================================
- Coverage   79.83%   79.81%   -0.02%     
==========================================
  Files         805      805              
  Lines       23050    23039      -11     
  Branches     2727     2726       -1     
==========================================
- Hits        18402    18389      -13     
- Misses       3979     3981       +2     
  Partials      669      669              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@jeremi jeremi left a comment

Choose a reason for hiding this comment

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

Sounds good to me @Markpenalosa can you test in the UI?

@jeremi jeremi merged commit a5fde34 into 17.0 Nov 13, 2025
12 of 13 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 13, 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.

3 participants