Skip to content

OBPIH-6853 build table for TO RESOLVE tab#5025

Merged
ewaterman merged 2 commits intodevelopfrom
ft/OBPIH-6853-populate-to-resolve-tab
Feb 5, 2025
Merged

OBPIH-6853 build table for TO RESOLVE tab#5025
ewaterman merged 2 commits intodevelopfrom
ft/OBPIH-6853-populate-to-resolve-tab

Conversation

@ewaterman
Copy link
Member

@ewaterman ewaterman commented Feb 3, 2025

✨ Description of Change

Link to GitHub issue or Jira ticket:

Description:

The TO RESOLVE tab now contains a table like the TO COUNT tab with all the same filter abilities. For now the table contains a row for all cycle count requests where status == CREATED. There's a todo in the code to filter this down to only rows where the cycle count == COUNTED or INVESTIGATING, but that will require changes to the get cycle count candidates API to be able to filter by cycle count status (and not just cycle count request status) so I left that as a TODO for now.


📷 Screenshots & Recordings (optional)

Screenshot from 2025-02-03 15-23-14

@github-actions github-actions bot added type: feature A new piece of functionality for the app domain: frontend Changes or discussions relating to the frontend UI domain: l10n Changes or discussions relating to localization & Internationalization labels Feb 3, 2025
@codecov
Copy link

codecov bot commented Feb 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 7.79%. Comparing base (a49f950) to head (25a4168).
Report is 201 commits behind head on develop.

Additional details and impacted files
@@            Coverage Diff            @@
##             develop   #5025   +/-   ##
=========================================
  Coverage       7.79%   7.79%           
  Complexity       868     868           
=========================================
  Files            620     620           
  Lines          42744   42744           
  Branches       10370   10370           
=========================================
  Hits            3334    3334           
  Misses         38914   38914           
  Partials         496     496           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

// TODO: We need to display only the rows where cycle count in [INVESTIGATING, COUNTED].
// This will require us to be able to filter on the cycle count status, not just the cycle
// count request status! So we need to be able to support fetching by a list of values,
// or we need the get candidate API to internally fetch both.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets discuss this. Three solutions:

First solution is to change the get cycle count candidates API to filter by cycle count status instead of cycle count request status. Then change the API to allow for multiple statuses to be passed in.

Second solution is to change cycle count request status to contain all the statuses that the cycle count has. Then change the API to allow for multiple statuses to be passed in. We could make cycle count request status be 100% derived from cycle count status (and not a value in the db).

Third solution is to change the get cycle count candidates API to accept allow the following values for "status" to be provided:

  • NO_REQUEST
  • TO_COUNT
  • TO_RESOLVE
  • TO_REVIEW

and then map those values to the underlying tables like the following in the get cycle count candidates API:

switch (command.status) {
  case NO_REQUEST:
    // fetch all rows where no active cycle count request
  case TO_COUNT:
    // fetch all rows where cycle count request is active and cycle count status in [REQUESTED, COUNTING]
  case TO_RESOLVE:
    // fetch all rows where cycle count request is active and cycle count status in [COUNTED, INVESTIGATING]
  case TO_REVIEW:
    // fetch all rows where cycle count request is active and cycle count status in [READY_TO_REVIEW]
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<TableCell className="rt-td">
<StatusIndicator
variant="primary"
status={translate(`react.cycleCount.table.status.${getValue()}.label`, 'To Resolve')}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure how we normally translate values like this. The possible values are defined in an enum on the backend. In message.properties it's defined like:

react.cycleCount.status.COUNTED.label=To Resolve
react.cycleCount.status.INVESTIGATING.label=Resolution In Progress
...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ewaterman ewaterman self-assigned this Feb 3, 2025
@ewaterman ewaterman marked this pull request as ready for review February 3, 2025 21:45
};
spinner.show();
try {
await cycleCountApi.startCount(payload, currentLocation?.id);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can also change the name of the method here to probably startResolution

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ewaterman ewaterman force-pushed the ft/OBPIH-6853-populate-to-resolve-tab branch from eb5f8b9 to 191321c Compare February 4, 2025 13:56
@ewaterman ewaterman merged commit ef18aef into develop Feb 5, 2025
9 checks passed
@ewaterman ewaterman deleted the ft/OBPIH-6853-populate-to-resolve-tab branch February 5, 2025 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: frontend Changes or discussions relating to the frontend UI domain: l10n Changes or discussions relating to localization & Internationalization type: feature A new piece of functionality for the app

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants