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

Add Automatic Approval for OpenSPP Self-Reg Change Requests #653

Merged
merged 2 commits into from
Feb 18, 2025

Conversation

gonzalesedwin1123
Copy link
Member

Why is this change needed?

A new function in the Change Request module is needed to support the direct approval and application of CRs submitted by the OpenSPP Self-reg app. The following will be provided by the new function:

  • Accept CRs only from users belonging to the "Change Request External API" group.
  • Validate the CR input data.
  • Skip the validation of required attachments.
  • Automatically approve the CR after the input data has been validated.

How was the change implemented?

  • A new function "approve_cr" was added to the spp.change.request model.
  • This function can be called by external APIs (XMLRPC) authenticated with a user belonging to the "Change Request External API" group.

New unit tests

None

Unit tests executed by the author

None

How to test manually

  • Use the OpenSPP Self-reg app to create a new change request.
  • Check the new change request in the OpenSPP change request UI.
  • Its status must be automatically set to "Applied".

Related links

Add Automatic Approval for OpenSPP Self-Reg Change Requests

@gonzalesedwin1123 gonzalesedwin1123 marked this pull request as ready for review October 31, 2024 14:26
Copy link

@aldnav aldnav left a comment

Choose a reason for hiding this comment

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

Thanks for the swift support @gonzalesedwin1123
Please check my comments.

spp_change_request/models/change_request.py Outdated Show resolved Hide resolved
spp_change_request/models/mixins/source_mixin.py Outdated Show resolved Hide resolved
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
27 Security Hotspots
14.6% 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

Copy link

codecov bot commented Nov 28, 2024

Codecov Report

Attention: Patch coverage is 11.11111% with 16 lines in your changes missing coverage. Please review.

Project coverage is 72.66%. Comparing base (8a1e9f8) to head (5ea10c6).
Report is 288 commits behind head on 17.0.

Files with missing lines Patch % Lines
spp_change_request/models/mixins/source_mixin.py 7.69% 11 Missing and 1 partial ⚠️
spp_change_request/models/change_request.py 20.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             17.0     #653      +/-   ##
==========================================
- Coverage   80.39%   72.66%   -7.73%     
==========================================
  Files         574      667      +93     
  Lines       14595    17274    +2679     
  Branches     1776     2198     +422     
==========================================
+ Hits        11733    12553     +820     
- Misses       2475     4319    +1844     
- Partials      387      402      +15     

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

Copy link

@aldnav aldnav left a comment

Choose a reason for hiding this comment

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

Thanks for a swift resolution @gonzalesedwin1123

@gonzalesedwin1123 gonzalesedwin1123 merged commit 5370dbb into 17.0 Feb 18, 2025
9 of 11 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Feb 18, 2025
@gonzalesedwin1123 gonzalesedwin1123 deleted the 635-openspp-modules branch February 18, 2025 06:45
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.

Add Automatic Approval for OpenSPP Self-Reg Change Requests
4 participants