Bug 1730501

Summary: Skip processing groups the user is in when processing approvals
Product: [Community] Bugzilla Reporter: Jeff Fearn 🐞 <jfearn>
Component: ExtensionsAssignee: Jeff Fearn 🐞 <jfearn>
Extensions sub component: Workflows QA Contact: Lianghui Yu <liyu>
Status: CLOSED CURRENTRELEASE Docs Contact:
Severity: unspecified    
Priority: unspecified    
Version: 5.0   
Target Milestone: 5.0-RH6   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.0.4-rh27 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-08 14:20:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jeff Fearn 🐞 2019-07-16 22:52:21 UTC
Description of problem:
If the user is in a group and someone tries to approve their membership again the can_apply_for and can_approve checks should s be skipped.

Version-Release number of selected component (if applicable):
5.0

How reproducible:
???

Steps to Reproduce:
1. ??
2.
3.

Actual results:
Approval is denied because can_apply_for checks if the user is already a member.

Expected results:
Just ignore the change request if the user is already a member.

Additional info:
This could be related to inheritance. e.g. If a user applies for A and B and A grants membership to B, if A is processed first then B could possibly fail this way.

Comment 1 Jeff Fearn 🐞 2019-07-16 22:56:07 UTC
A more reliable way for this to trigger is for the user to open two bugs, one with asking for A and another bug asking for B. If the bug asking for A is processed first then the bug asking for B will fail.

Comment 2 Lianghui Yu 2019-07-19 06:37:58 UTC
Verified on latest QE environment,
Result: PASS
the comment will appear when user is already a user for that group, and bug can close itself without problem.
and API will not open up another workflow bug when that user already in that group.

Comment 4 Jeff Fearn 🐞 2019-08-06 00:29:47 UTC
This change has been staged on partner bugzilla. Feel free to test it there and let us know if you have any issues.

https://partner-bugzilla.redhat.com

Comment 5 Jeff Fearn 🐞 2019-08-08 14:20:58 UTC
This change is now live. If there are any issues, do not reopen this
bug. Instead, you should create a new bug and reference this bug.