• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

RoundingWell / care-ops-frontend / c8db7f44-c7fd-4a3e-8b98-d394b6031a7d

21 May 2026 06:16PM UTC coverage: 80.537% (-19.4%) from 99.963%
c8db7f44-c7fd-4a3e-8b98-d394b6031a7d

Pull #1697

circleci

paulfalgout
fix(work): include program chain on action and flow fetches that honor it

Centralize ACTION_INCLUDE / FLOW_INCLUDE in the entity service and apply
them everywhere the backend actually reads the include parameter:

- /actions/{id} (fetchAction, fetchActionWithResponses, manage:add refetch)
- /flows/{id} (fetchFlow, manage:add refetch)
- /flows/{id}/relationships/actions (fetchActionsByFlow on the flow page)

The patient-relationship list endpoints
(/patients/{id}/relationships/actions, /patients/{id}/relationships/flows)
silently drop include today, so fetchActionsByPatient and
fetchFlowsByPatient keep their original data shape. Once the backend's
ListPatientActionsResponder / ListPatientFlowsResponder learn to honor
Includes::fromRequest, those call sites can pass ACTION_INCLUDE /
FLOW_INCLUDE the same way.
Pull Request #1697: fix(work): include program relationships on action and flow fetches

1394 of 1875 branches covered (74.35%)

Branch coverage included in aggregate %.

11 of 11 new or added lines in 5 files covered. (100.0%)

1071 existing lines in 100 files now uncovered.

5028 of 6099 relevant lines covered (82.44%)

139.21 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

80.0
/src/js/utils/sorting.js
1
import { isNumber } from 'underscore';
2

3
// negates based on sort direction a sortable value
4
function sortByDir(sortDirection, sortableVal) {
5
  return (sortDirection === 'desc') ? (sortableVal * -1) : sortableVal;
1,447✔
6
}
7

8
function alphaSort(sortDir, a, b, nullVal = '') {
1,434✔
9
  if (!a) a = nullVal;
1,441✔
10
  if (!b) b = nullVal;
1,441✔
11
  return sortByDir(sortDir, a.localeCompare(b));
1,441✔
12
}
13

14
function getSortNum(val, defaultVal = -1) {
×
15
  return isNumber(val) ? val : defaultVal;
12!
16
}
17

18
function numSortBy(sortDir, val, nullVal) {
UNCOV
19
  const num = getSortNum(val, nullVal);
×
UNCOV
20
  return sortByDir(sortDir, num);
×
21
}
22

23
function numSort(sortDir, a, b, nullVal = Number.NEGATIVE_INFINITY) {
6✔
24
  if (!a) a = nullVal;
6✔
25
  if (!b) b = nullVal;
6✔
26
  const sortVal = getSortNum(a, nullVal) > getSortNum(b, nullVal) ? 1 : -1;
6✔
27
  return sortByDir(sortDir, sortVal);
6✔
28
}
29

30
function intSortBy(sortDir, val, nullVal) {
UNCOV
31
  const int = getSortNum(val, nullVal);
×
UNCOV
32
  return sortByDir(sortDir, parseInt(int, 10));
×
33
}
34

35
export {
36
  alphaSort,
37
  intSortBy,
38
  numSortBy,
39
  numSort,
40
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc