Energinet-DataHub / ARCHIVED-geh-charges

Apache License 2.0
7 stars 3 forks source link

Extend Web API to return one ChargeV1Dto per ChargePeriod of a Charge #1858

Closed prtandrup closed 1 year ago

prtandrup commented 1 year ago

Description

Right now, when a user searches for charges in frontend, the backend (Charges Web API) delivers one ChargeV1Dto per charge which contains the current charge period details.

This changes with this PR, as the Web API afterwards will be delivering 1x ChargeV1Dto for each charge period. And the Web API will provide the List<ChargeV1Dto> response sorted by ChargeId (ASC) and then by ValidFromDateTime (DESC). Sorting confirmed by SME.

Note, the frontend currently does the sorting. This needs to be changed. This will be a PR in the frontend repo.

Additional:

References

codecov[bot] commented 1 year ago

Codecov Report

Merging #1858 (8d8ca71) into main (7b7abee) will decrease coverage by 0.51%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1858      +/-   ##
==========================================
- Coverage   84.65%   84.13%   -0.52%     
==========================================
  Files         468      447      -21     
  Lines        8114     7817     -297     
  Branches      431       22     -409     
==========================================
- Hits         6869     6577     -292     
+ Misses       1159     1119      -40     
- Partials       86      121      +35     
Flag Coverage Δ
business 87.67% <100.00%> (?)
clientlibraries 32.73% <ø> (+0.89%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...harges.Clients.Tests/Charges/ChargesClientTests.cs 0.00% <ø> (ø)
...t.DataHub.Charges.Clients/Charges/ChargesClient.cs 100.00% <ø> (ø)
...Hub.Charges.Clients/Charges/ChargesRelativeUris.cs 100.00% <ø> (ø)
...arges.QueryApi/ModelPredicates/ChargeQueryLogic.cs 54.00% <100.00%> (-31.90%) :arrow_down:
...rges.QueryApi/QueryServices/ChargesQueryService.cs 100.00% <100.00%> (ø)
...Charges.WebApi/Controllers/V1/ChargesController.cs 100.00% <100.00%> (ø)
...ergyHub.Charges.Domain/Charges/ChargeIdentifier.cs 0.00% <0.00%> (-100.00%) :arrow_down:
...ain/Dtos/Events/MarketParticipantCreatedCommand.cs 14.28% <0.00%> (-85.72%) :arrow_down:
...es.Domain/Dtos/Events/GridAreaOwnerAddedCommand.cs 33.33% <0.00%> (-66.67%) :arrow_down:
...Dtos/Events/MarketParticipantNameChangedCommand.cs 33.33% <0.00%> (-66.67%) :arrow_down:
... and 75 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication