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

AMD-694-latest [frontend] [backend] fix: fix dc issues #1274

Merged
merged 12 commits into from
Mar 22, 2024
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ public CardCollection getStoryPointsAndCycleTimeAndReworkInfoForDoneCards(StoryP
.size();
double reworkRatio = realDoneCards.isEmpty() ? 0
: BigDecimal.valueOf(reworkCardNumber)
.divide(BigDecimal.valueOf(realDoneCards.size()), 2, RoundingMode.HALF_UP)
.divide(BigDecimal.valueOf(realDoneCards.size()), 4, RoundingMode.HALF_UP)
.doubleValue();

return CardCollection.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ private List<String[]> getRowFromRework(Rework rework) {
rows.add(new String[] { REWORK_FIELD, "Total rework times", String.valueOf(rework.getTotalReworkTimes()) });
rows.add(new String[] { REWORK_FIELD, "Total rework cards", String.valueOf(rework.getTotalReworkCards()) });
rows.add(new String[] { REWORK_FIELD, "Rework cards ratio(Total rework cards/Throughput)",
String.valueOf(rework.getReworkCardsRatio()) });
String.valueOf(rework.getReworkCardsRatio() * 100) });
return rows;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ void shouldHasNoContentForAveragesWhenGetDataFromCsvGivenDataTypeIsMetricAndTheQ
"Group","Metrics","Value"
"Rework","Total rework times","3"
"Rework","Total rework cards","3"
"Rework","Rework cards ratio(Total rework cards/Throughput)","0.99"
"Rework","Rework cards ratio(Total rework cards/Throughput)","99.0"
"Deployment frequency","Heartbeat / Deploy prod / Deployment frequency(Deployments/Day)","0.78"
"Lead time for changes","Heartbeat / Deploy prod / PR Lead Time","0"
"Lead time for changes","Heartbeat / Deploy prod / Pipeline Lead Time","0.02"
Expand Down
255 changes: 15 additions & 240 deletions frontend/__tests__/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,20 +412,6 @@ export const MOCK_REPORT_RESPONSE: ReportResponseDTO = {
},
],
},
rework: {
totalReworkTimes: 111,
reworkState: 'In Dev',
fromAnalysis: null,
fromInDev: 111,
fromBlock: 111,
fromWaitingForTesting: 111,
fromTesting: null,
fromReview: 111,
fromDone: 111,
totalReworkCards: 111,
reworkCardsRatio: 111,
throughput: 1110,
},
deploymentFrequency: {
avgDeploymentFrequency: {
name: 'Average',
Expand Down Expand Up @@ -468,6 +454,21 @@ export const MOCK_REPORT_RESPONSE: ReportResponseDTO = {
},
],
},
rework: {
totalReworkTimes: 111,
reworkState: 'In Dev',
fromAnalysis: null,
fromInDev: null,
fromBlock: 111,
fromFlag: null,
fromReview: 111,
fromWaitingForTesting: 111,
fromTesting: null,
fromDone: 111,
totalReworkCards: 111,
reworkCardsRatio: 0.8888,
throughput: 1110,
},
leadTimeForChanges: {
leadTimeForChangesOfPipelines: [
{
Expand Down Expand Up @@ -525,232 +526,6 @@ export const MOCK_RETRIEVE_REPORT_RESPONSE = {
interval: 10,
};

export const EXPECTED_REPORT_VALUES = {
velocityList: [
{ id: 0, name: 'Velocity(Story Point)', valueList: [{ value: 20 }] },
{ id: 1, name: 'Throughput(Cards Count)', valueList: [{ value: 14 }] },
],
cycleTimeList: [
{
id: 0,
name: 'Average cycle time',
valueList: [
{ value: 21.18, unit: '(Days/SP)' },
{ value: '30.26', unit: '(Days/Card)' },
],
},
{
id: 1,
name: 'Total development time / Total cycle time',
valueList: [{ value: '57.25%' }],
},
{
id: 2,
name: 'Average development time',
valueList: [
{ value: '12.13', unit: '(Days/SP)' },
{ value: '17.32', unit: '(Days/Card)' },
],
},
],
classification: [
{
id: 0,
name: 'FS Work Type',
valuesList: [{ name: 'Feature Work - Planned', value: '57.14%' }],
},
],
deploymentFrequencyList: [
{
id: 0,
name: 'fs-platform-onboarding/ :shipit: deploy to PROD',
valuesList: [
{
name: 'Deployment frequency',
value: '0.30',
},
],
},
{
id: 1,
name: 'Average',
valuesList: [
{
name: 'Deployment frequency',
value: '0.40',
},
],
},
],
devMeanTimeToRecoveryList: [
{
id: 0,
name: 'Heartbeat/:react: Build Frontend',
valuesList: [
{
name: 'Dev mean time to recovery',
value: '4.32',
},
],
},
{
id: 1,
name: 'Heartbeat/:cloudformation: Deploy infra',
valuesList: [
{
name: 'Dev mean time to recovery',
value: '0.00',
},
],
},
{
id: 2,
name: 'Heartbeat/:rocket: Run e2e',
valuesList: [
{
name: 'Dev mean time to recovery',
value: '7.67',
},
],
},
{
id: 3,
name: 'Average',
valuesList: [
{
name: 'Dev mean time to recovery',
value: '4.00',
},
],
},
],
leadTimeForChangesList: [
{
id: 0,
name: 'fs-platform-payment-selector/RECORD RELEASE TO PROD',
valuesList: [
{ name: PR_LEAD_TIME, value: '45.04' },
{ name: PIPELINE_LEAD_TIME, value: '43.12' },
{ name: TOTAL_DELAY_TIME, value: '88.17' },
],
},
{
id: 1,
name: 'Average',
valuesList: [
{ name: PR_LEAD_TIME, value: '60.79' },
{ name: PIPELINE_LEAD_TIME, value: '39.03' },
{ name: TOTAL_DELAY_TIME, value: '99.82' },
],
},
],
devChangeFailureRateList: [
{
id: 0,
name: 'fs-platform-onboarding/ :shipit: deploy to PROD',
valuesList: [
{
name: 'Dev change failure rate',
value: '0.00%(0/2)',
},
],
},
{
id: 1,
name: 'Average',
valuesList: [
{
name: 'Dev change failure rate',
value: '0.00%(0/6)',
},
],
},
],
exportValidityTimeMin: 30,
reworkList: [
{
id: 0,
name: 'Total rework ',
valueList: [
{
value: 111,
unit: ' (times)',
},
],
},
{
id: 2,
name: 'From in dev to in dev ',
valueList: [
{
value: 111,
unit: ' (times)',
},
],
},
{
id: 3,
name: 'From block to in dev ',
valueList: [
{
value: 111,
unit: ' (times)',
},
],
},
{
id: 4,
name: 'From waiting for testing to in dev ',
valueList: [
{
value: 111,
unit: ' (times)',
},
],
},
{
id: 6,
name: 'From review to in dev ',
valueList: [
{
value: 111,
unit: ' (times)',
},
],
},
{
id: 7,
name: 'From done to in dev ',
valueList: [
{
value: 111,
unit: ' (times)',
},
],
},
{
id: 8,
name: 'Total rework cards ',
valueList: [
{
value: 111,
unit: ' (cards)',
},
],
},
{
id: 9,
name: 'Rework cards ratio ',
valueList: [
{
value: 111,
unit: ' (rework cards/throughput)',
},
],
},
],
};

export const EMPTY_REPORT_VALUES: ReportResponseDTO = {
velocity: null,
classificationList: null,
Expand Down
Loading
Loading