-
Notifications
You must be signed in to change notification settings - Fork 23
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
chore[1194]: fixed bug #1197
base: main
Are you sure you want to change the base?
chore[1194]: fixed bug #1197
Conversation
...ckend/src/main/java/org/eclipse/tractusx/traceability/policies/domain/PolicyServiceImpl.java
Show resolved
Hide resolved
Hey @ds-ashanmugavel, |
CHANGELOG.md
Outdated
- #943 renamed distinctFilterValues API to searchable-values for the asBuilt, asPlanned and notification routes | ||
- #943 changed these endpoints to POST with body instead of GET with parameters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are those changelog entries deleted?
CHANGELOG.md
Outdated
@@ -33,7 +34,6 @@ _**For better traceability add the corresponding GitHub issue number in each cha | |||
- #1112 Added association int-a/int-b environment to argo workflow | |||
|
|||
### Changed | |||
- XXX update legal notice for documents arc42, admin and user manual to years 2024 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this changelog entry deleted?
if(registerPolicyRequest.validUntil().isAfter(Instant.now())){ | ||
return policyRepository.createPolicy(registerPolicyRequest); | ||
} | ||
throw new PolicyNotValidException("Policy is expired " +registerPolicyRequest); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not the policy that is expired, it's the Policy request that is not valid because of a not accepted "validUntil" value.
Please adapt the error message.
policyRepository.updatePolicy(updatePolicyRequest); | ||
return; | ||
} | ||
throw new PolicyNotValidException("Policy is expired " +updatePolicyRequest); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove those line breaks
|
||
// WRONG REQUEST OBJECT | ||
UpdatePolicyRequest request = new UpdatePolicyRequest(businessPartnerNumbers, policyIds, validUntil); | ||
// when/then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please be consistent with upper/lower case.
//GIVEN
//WHEN
//THEN
or
//given
//when
//then
* under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
********************************************************************************/package policies.response; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
********************************************************************************/package policies.response; | |
******************************************************************************** | |
/package policies.response; |
import java.time.OffsetDateTime; | ||
|
||
@Builder | ||
public record PoliciesResponse(@JsonFormat(shape = JsonFormat.Shape.STRING) OffsetDateTime validUntil, PayloadResponse payload |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The class name is in plural, despite there's only a single object returned
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, PolicyResponse already exists, why did you create a second one?
4d47aed
to
fd2ca25
Compare
@@ -20,6 +20,7 @@ | |||
|
|||
import lombok.AllArgsConstructor; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.apache.commons.beanutils.BeanUtils; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this really needed?
No description provided.