Commit 83d8740
committed
Correct general behavior in retrieveLocationLevel (#1245)
Location levels could only be retrieved by exact data. Expected behavior
was most recent.
during #1086 the "exact" match flag was changed from true to false.
Change is behavior was not correctly caught due to all tests using the
exact dates and the endpoint itself not providing appropriate
description.
Description has been updated.
The virtual location level tests were modified to specify exact date. In
diagnosing the issue I've discovered that the order of these operations
is wrong:
https://github.com/HydrologicEngineeringCenter/cwms-database/blob/f2670f46de2f41b724ac9d516505fa9a37c50cfa/schema/src/cwms/cwms_level_pkg_body.sql#L612
Virtual location levels should still support "or nearest before
behavior" but at the least with match being false while providing the
exact date should return the level and it does not.
I've set the default behavior of exact match to False, knowing this will
break existing virtual location level behavior, however, that will be
corrected with a database procedure fix.
(cherry picked from commit b2dfea9)1 parent aaaadd1 commit 83d8740
8 files changed
Lines changed: 90 additions & 19 deletions
File tree
- cwms-data-api/src
- main/java/cwms/cda
- api
- data/dao
- test
- java
- cwms/cda
- api
- data/dao
- fixtures
- resources/cwms/cda/data/sql
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
| |||
Lines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | | - | |
| 333 | + | |
334 | 334 | | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
335 | 341 | | |
336 | 342 | | |
337 | 343 | | |
| |||
364 | 370 | | |
365 | 371 | | |
366 | 372 | | |
| 373 | + | |
| 374 | + | |
367 | 375 | | |
368 | 376 | | |
369 | 377 | | |
| |||
374 | 382 | | |
375 | 383 | | |
376 | 384 | | |
377 | | - | |
| 385 | + | |
378 | 386 | | |
379 | 387 | | |
380 | 388 | | |
| |||
431 | 439 | | |
432 | 440 | | |
433 | 441 | | |
434 | | - | |
| 442 | + | |
435 | 443 | | |
436 | 444 | | |
437 | 445 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
461 | | - | |
| 461 | + | |
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
| |||
483 | 483 | | |
484 | 484 | | |
485 | 485 | | |
486 | | - | |
| 486 | + | |
487 | 487 | | |
488 | | - | |
| 488 | + | |
489 | 489 | | |
490 | 490 | | |
491 | 491 | | |
| |||
Lines changed: 57 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
105 | | - | |
106 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
110 | | - | |
| 111 | + | |
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
116 | | - | |
| 117 | + | |
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
| |||
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
126 | | - | |
| 127 | + | |
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
| |||
143 | 144 | | |
144 | 145 | | |
145 | 146 | | |
146 | | - | |
| 147 | + | |
147 | 148 | | |
148 | 149 | | |
149 | 150 | | |
| |||
156 | 157 | | |
157 | 158 | | |
158 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
159 | 197 | | |
160 | 198 | | |
161 | 199 | | |
| |||
968 | 1006 | | |
969 | 1007 | | |
970 | 1008 | | |
| 1009 | + | |
971 | 1010 | | |
972 | 1011 | | |
973 | 1012 | | |
| |||
984 | 1023 | | |
985 | 1024 | | |
986 | 1025 | | |
| 1026 | + | |
987 | 1027 | | |
988 | 1028 | | |
989 | 1029 | | |
| |||
1001 | 1041 | | |
1002 | 1042 | | |
1003 | 1043 | | |
| 1044 | + | |
1004 | 1045 | | |
1005 | 1046 | | |
1006 | 1047 | | |
| |||
1019 | 1060 | | |
1020 | 1061 | | |
1021 | 1062 | | |
| 1063 | + | |
1022 | 1064 | | |
1023 | 1065 | | |
1024 | 1066 | | |
| |||
1137 | 1179 | | |
1138 | 1180 | | |
1139 | 1181 | | |
| 1182 | + | |
1140 | 1183 | | |
1141 | 1184 | | |
1142 | 1185 | | |
| |||
1154 | 1197 | | |
1155 | 1198 | | |
1156 | 1199 | | |
| 1200 | + | |
1157 | 1201 | | |
1158 | 1202 | | |
1159 | 1203 | | |
| |||
1171 | 1215 | | |
1172 | 1216 | | |
1173 | 1217 | | |
| 1218 | + | |
1174 | 1219 | | |
1175 | 1220 | | |
1176 | 1221 | | |
| |||
1335 | 1380 | | |
1336 | 1381 | | |
1337 | 1382 | | |
| 1383 | + | |
1338 | 1384 | | |
1339 | 1385 | | |
1340 | 1386 | | |
| |||
1352 | 1398 | | |
1353 | 1399 | | |
1354 | 1400 | | |
| 1401 | + | |
1355 | 1402 | | |
1356 | 1403 | | |
1357 | 1404 | | |
| |||
1369 | 1416 | | |
1370 | 1417 | | |
1371 | 1418 | | |
| 1419 | + | |
1372 | 1420 | | |
1373 | 1421 | | |
1374 | 1422 | | |
| |||
1525 | 1573 | | |
1526 | 1574 | | |
1527 | 1575 | | |
| 1576 | + | |
1528 | 1577 | | |
1529 | 1578 | | |
1530 | 1579 | | |
| |||
1542 | 1591 | | |
1543 | 1592 | | |
1544 | 1593 | | |
| 1594 | + | |
1545 | 1595 | | |
1546 | 1596 | | |
1547 | 1597 | | |
| |||
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
| 129 | + | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| 223 | + | |
223 | 224 | | |
224 | 225 | | |
225 | 226 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
| |||
49 | 52 | | |
50 | 53 | | |
51 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
52 | 63 | | |
53 | 64 | | |
54 | 65 | | |
| |||
0 commit comments