Skip to content

Commit e0fa087

Browse files
chore(spp_programs): bump version to 19.0.2.0.3, add changelog, fix test flush
Add HISTORY.md entry for SQL aggregation optimization. Fix test to flush recordset before SQL-based computed fields read from DB.
1 parent e4b81a4 commit e0fa087

File tree

5 files changed

+22
-4
lines changed

5 files changed

+22
-4
lines changed

spp_programs/README.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,12 @@ Dependencies
254254
Changelog
255255
=========
256256

257+
19.0.2.0.3
258+
~~~~~~~~~~
259+
260+
- Replace cycle computed fields (total_amount, entitlements_count,
261+
approval flags) with SQL aggregation queries
262+
257263
19.0.2.0.2
258264
~~~~~~~~~~
259265

spp_programs/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"name": "OpenSPP Programs",
55
"summary": "Manage cash and in-kind entitlements, integrate with inventory, and enhance program management features for comprehensive social protection and agricultural support.",
66
"category": "OpenSPP/Core",
7-
"version": "19.0.2.0.2",
7+
"version": "19.0.2.0.3",
88
"sequence": 1,
99
"author": "OpenSPP.org",
1010
"website": "https://github.com/OpenSPP/OpenSPP2",

spp_programs/readme/HISTORY.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### 19.0.2.0.3
2+
3+
- Replace cycle computed fields (total_amount, entitlements_count, approval flags) with SQL aggregation queries
4+
15
### 19.0.2.0.2
26

37
- Add composite indexes for frequent query patterns on entitlements and program memberships

spp_programs/static/description/index.html

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -658,13 +658,20 @@ <h2><a class="toc-backref" href="#toc-entry-1">Changelog</a></h2>
658658
</div>
659659
</div>
660660
<div class="section" id="section-1">
661+
<h1>19.0.2.0.3</h1>
662+
<ul class="simple">
663+
<li>Replace cycle computed fields (total_amount, entitlements_count,
664+
approval flags) with SQL aggregation queries</li>
665+
</ul>
666+
</div>
667+
<div class="section" id="section-2">
661668
<h1>19.0.2.0.2</h1>
662669
<ul class="simple">
663670
<li>Add composite indexes for frequent query patterns on entitlements and
664671
program memberships</li>
665672
</ul>
666673
</div>
667-
<div class="section" id="section-2">
674+
<div class="section" id="section-3">
668675
<h1>19.0.2.0.1</h1>
669676
<ul class="simple">
670677
<li>Replace Python-level uniqueness checks with SQL UNIQUE constraints for
@@ -673,7 +680,7 @@ <h1>19.0.2.0.1</h1>
673680
constraint creation</li>
674681
</ul>
675682
</div>
676-
<div class="section" id="section-3">
683+
<div class="section" id="section-4">
677684
<h1>19.0.2.0.0</h1>
678685
<ul class="simple">
679686
<li>Initial migration to OpenSPP2</li>

spp_programs/tests/test_cycle_computed_fields.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ def _create_entitlement(self, partner, amount, state="draft"):
3636
}
3737
)
3838
if state != "draft":
39-
ent.write({"state": state})
39+
ent.state = state
40+
ent.flush_recordset()
4041
return ent
4142

4243
# -- total_amount --

0 commit comments

Comments
 (0)