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

Open
wants to merge 2 commits into
base: 17.0
Choose a base branch
from

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 (ab91df9) to head (5ea10c6).
Report is 447 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   73.22%   72.66%   -0.56%     
==========================================
  Files         545      667     +122     
  Lines       13631    17274    +3643     
  Branches     1751     2198     +447     
==========================================
+ Hits         9981    12553    +2572     
- Misses       3352     4319     +967     
- Partials      298      402     +104     

☔ 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

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.

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