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

GET irs/policies should not return BPNLs without policies #533

Closed
2 tasks done
dsmf opened this issue Apr 11, 2024 · 4 comments
Closed
2 tasks done

GET irs/policies should not return BPNLs without policies #533

dsmf opened this issue Apr 11, 2024 · 4 comments
Assignees
Labels
bug Something isn't working policy_store Issues regarding the IRS policy store. R24.5 release-hot-fix pbi is relevant for current release and for hotfix path

Comments

@dsmf
Copy link
Contributor

dsmf commented Apr 11, 2024

As ... ,
I want that after DELETE / UPDATE policies each BPN which does not have any policies anymore is removed from the store,
so that GET irs/policies does not return BPN's that have no policies.

Hints / Details

Currently it looks like this:

GET irs/policies

{
	"BPNL00000001CRHK": [],
	"BPNL00000003B3NX": [],
	"BPNL00000003B2OM": [
		{
			"validUntil": "2025-12-31T23:59:59.999Z",
			"payload": {
				"@context": {
					"odrl": "http://www.w3.org/ns/odrl/2/"
				},
				"@id": "id-3.0-trace",
				"policy": {
					"policyId": "id-3.0-trace",
					...
				}
			}
		}
	],
	"BPNLTEST12345699": [],
        ...
}

Filtering BPN's without policies for GET policies requests is prepared in the following branch: 533-get-policies-filter-out-empty) BUT we should do a real cleanup on DELETE / UPDATE policies instead, so the business partner numbers without policies are removed from the policy store.

Acceptance Criteria

  • when DELETE / UPDATE leaves one or more BPN without policies, this must be cleaned up. The BPN must be removed from policy store.
  • as a result of this cleanup only BPNLs should be returned that have either been queried specifically or have policies
    • GET irs/policies must return only BPN's that have policies.
    • GET irs/policies?businessPartnerNumbers=<a BPN without policies i.e. not existing in policy store> must return empty

Out of Scope

  • ...
@dsmf dsmf added this to IRS Apr 11, 2024
@github-project-automation github-project-automation bot moved this to inbox in IRS Apr 11, 2024
@jzbmw jzbmw added the bug Something isn't working label Apr 12, 2024
@jzbmw jzbmw removed the status in IRS Apr 12, 2024
@mkanal mkanal moved this to inbox in IRS Apr 16, 2024
@mkanal mkanal moved this from inbox to backlog in IRS Apr 24, 2024
@dsmf dsmf self-assigned this May 11, 2024
@dsmf dsmf moved this from backlog to wip in IRS May 11, 2024
@dsmf
Copy link
Contributor Author

dsmf commented May 11, 2024

@dsmf
Copy link
Contributor Author

dsmf commented May 11, 2024

ready for peer review

@dsmf dsmf added the policy_store Issues regarding the IRS policy store. label May 11, 2024
@dsmf dsmf moved this from wip to test in IRS May 13, 2024
@dsmf
Copy link
Contributor Author

dsmf commented May 13, 2024

Hi @mkanal, @ds-kgassner , deployed on DEV, ready for test

@mkanal
Copy link
Contributor

mkanal commented May 13, 2024

PO acceptance in behalf of @jzbmw

@mkanal mkanal closed this as completed May 13, 2024
@mkanal mkanal moved this from test to done in IRS May 13, 2024
@mkanal mkanal added R24.5 release-hot-fix pbi is relevant for current release and for hotfix path labels May 13, 2024
ds-jhartmann pushed a commit that referenced this issue May 13, 2024
#533 broke integration tests because now an empty BPNL is not returned anymore => NPE in tests
ds-jhartmann pushed a commit to ds-jhartmann/item-relationship-service that referenced this issue Jun 13, 2024
…XX-fix-reset-env-script

feat(impl):[TRI-XXX] fix reset env script - encode id to base64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working policy_store Issues regarding the IRS policy store. R24.5 release-hot-fix pbi is relevant for current release and for hotfix path
Projects
Status: done
Development

No branches or pull requests

3 participants