refactor(coral): Use new property hasOpenRequestOnEnyEnv
for Claim Banners
#1811
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Linked issue
Resolves: #1756
What kind of change does this PR introduce?
What is the current behavior?
If a topic/connector has an open promotion request, users from different team will see the "you can claim this" banner and be able to do a claim request. This can cause all kind of messes, e.g. a topic on different environments belonging to different teams etc. Reason was that the property
hasOpenRequest
, that we used to check that, only checks request on the current environment, but a promotion request belongs to the target env.What is the new behavior?
We have a new property in the backend,
hasOpenRequestOnAnyEnv
that, well, shows if there is any request open on any env. We now use this to decide how the claim banner looks and if user can claim.