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

[POLICY_STORE] Dedicated removal of policy from BPNL #559

Closed
mkanal opened this issue Apr 24, 2024 · 7 comments
Closed

[POLICY_STORE] Dedicated removal of policy from BPNL #559

mkanal opened this issue Apr 24, 2024 · 7 comments
Assignees
Labels
policy_store Issues regarding the IRS policy store. spill_over Issues which are not finished yet

Comments

@mkanal
Copy link
Contributor

mkanal commented Apr 24, 2024

As user
I want to remove policy from a BPNL collection
so that the user removes a dedicated policy from a BPNL

Link

Hints / Details

  • ...

Acceptance Criteria

  • [ ] API endpoints supports removal of policyId from BPNL
  • [ ] Add integration tests to cover the functionality
DELETE /irs/policies/<thePolicyId>/bpnl/<theBPNL>

disadvantages:

only 1:1 delete
requires another endpoint for adding BPNL to a polidy

advantage:

easy error handling

Out of Scope

  • ...
@dsmf
Copy link
Contributor

dsmf commented Apr 24, 2024

suggestion:
DELETE /irs/policies/<thePolicyId>/bpnl/<theBPNL>

disadvantages:

  • only 1:1 delete
  • requires another endpoint for adding BPNL to a polidy

advantage:

  • easy error handling

more flexible alternatives that do both update and delete:

with entry point BPNL:

PATCH /irs/bpnls/<BPNL>

body for automatic addition / removal:

{
	policyIds: [ <list of policyIds> ]
}

body for for defined addition / removal:

{
	policyIdsToAdd: [ <list of policyIds> ],
	policyIdsToRemove: [ <list of policyIds> ] 
}


in both cases response:

{
	policyIdsAdded: [ <list of policyIds> ],
	policyIdsRemoved: [ <list of policyIds> ],
        errors: [ ... ]
}

with entry point policy:

PATCH /irs/policies/<policyId>

body for automatic addition / removal:

{
	bpnls: [ <list of BPNLs> ]  
}

body for for defined addition / removal:

{
	bpnlsToAdd: [ <list of BPNLs> ],  
	bpnlsToRemove: [ <list of BPNLs> ]
}


in both cases response:


response

{
	bpnlsAdded: [ <list of policyIds> ],
	bpnlsRemoved: [ <list of policyIds> ],
        errors: [...]
}

Delete policy from all BPNLs stays as it is currently implemented:

DELETE /irs/policies/<thePolicyId>

@mkanal mkanal moved this from inbox to backlog in IRS Apr 29, 2024
@dsmf dsmf moved this from backlog to wip in IRS May 10, 2024
@dsmf dsmf self-assigned this May 10, 2024
@dsmf
Copy link
Contributor

dsmf commented May 10, 2024

Pull Request

Outcome

  • DELETE /irs/policies/<thePolicyId>/bpnl/<theBPNL> implemented
  • integration test: TRI-2005

@dsmf
Copy link
Contributor

dsmf commented May 11, 2024

ready for peer review

ds-jhartmann pushed a commit that referenced this issue May 13, 2024
ds-jhartmann added a commit that referenced this issue May 13, 2024
ds-jhartmann added a commit that referenced this issue May 13, 2024
ds-jhartmann added a commit that referenced this issue May 13, 2024
ds-jhartmann added a commit that referenced this issue May 13, 2024
…ferences (to simplify comparison)"

This reverts commit 7e61c02.
ds-jhartmann added a commit that referenced this issue May 13, 2024
@ds-jhartmann ds-jhartmann mentioned this issue May 13, 2024
2 tasks
@dsmf
Copy link
Contributor

dsmf commented May 13, 2024

@mkanal, @ds-kgassner -> ready for test

@dsmf dsmf moved this from wip to test in IRS May 13, 2024
@mkanal mkanal added the spill_over Issues which are not finished yet label May 14, 2024
@ds-kgassner
Copy link
Contributor

tested successfully - approved from my side

@dsmf
Copy link
Contributor

dsmf commented May 14, 2024

@mkanal -> ready for PO review

@dsmf dsmf moved this from test to review in IRS May 14, 2024
@mkanal
Copy link
Contributor Author

mkanal commented Jun 5, 2024

LGFM. PO acceptance in behalf of @jzbmw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
policy_store Issues regarding the IRS policy store. spill_over Issues which are not finished yet
Projects
Status: done
Development

No branches or pull requests

4 participants