Skip to content

AMP-31226: Add third dimension for disaggregation - #4522

Open
brianbrix wants to merge 54 commits into
developfrom
feature/AMP-31226/New-Disaggregation-Dimension
Open

brianbrix wants to merge 54 commits into
developfrom
feature/AMP-31226/New-Disaggregation-Dimension

Conversation

@brianbrix

Copy link
Copy Markdown
Contributor

No description provided.

brianbrix and others added 30 commits April 26, 2026 21:33
# Conflicts:
#	amp/src/main/java/org/digijava/module/aim/helper/GlobalSettingsConstants.java
#	amp/src/main/resources/xmlpatches/4.0/AMP-31057-Add-Currecies-for-dashboard.xml
#	amp/src/main/resources/xmlpatches/4.0/AMP-31057-Donor-Funding-Admin-Levels-v1.xml
#	amp/src/main/resources/xmlpatches/general/views/v_nationalobjectives_level_0.xml
#	amp/src/main/resources/xmlpatches/general/views/v_nationalobjectives_level_1.xml
#	amp/src/main/resources/xmlpatches/general/views/v_nationalobjectives_level_2.xml
#	amp/src/main/resources/xmlpatches/general/views/v_nationalobjectives_level_3.xml
#	amp/src/main/resources/xmlpatches/general/views/v_nationalobjectives_level_4.xml
#	amp/src/main/resources/xmlpatches/general/views/v_nationalobjectives_level_5.xml
#	amp/src/main/resources/xmlpatches/general/views/v_nationalobjectives_level_6.xml
#	amp/src/main/resources/xmlpatches/general/views/v_nationalobjectives_level_7.xml
#	amp/src/main/resources/xmlpatches/general/views/v_nationalobjectives_level_8.xml
#	amp/src/main/resources/xmlpatches/general/views/v_pledges_tertiary_programs_level_2.xml
#	amp/src/main/resources/xmlpatches/general/views/v_pledges_tertiary_programs_level_3.xml
#	amp/src/main/webapp/WEB-INF/jsp/esrigis/view/mainmapPopup.jsp
Missing gazeteer
# Conflicts:
#	.github/workflows/deploy.yml
#	amp/pom.xml
#	amp/src/main/java/org/dgfoundation/amp/onepager/util/ActivityUtil.java
#	amp/src/main/java/org/digijava/module/message/jobs/AmpDonorFundingJob.java
#	amp/src/main/resources/org/digijava/module/aim/dbentity/AmpStructure.hbm.xml
#	amp/src/main/webapp/WEB-INF/jsp/esrigis/view/mainmapPopup.jsp
Copilot AI lite review requested due to automatic review settings November 2, 2026 05:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

A critical active finding remains in AmpStructure.clone(): its shallow-copied image set is mutated, corrupting the original structure during merges.

3 open issues

Review effort: Lite

Copilot AI lite review requested due to automatic review settings November 2, 2026 07:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Approval is blocked by critical active issues: the new report type is missing from backend mappings, causing previews to fail, and its fetch path includes non-disaggregated rows instead of only option rows.

6 open issues

Review effort: Lite

Comment on lines +69 to +70
case 'funding-indicator-disaggregation':
return 'ID';
Comment on lines 1596 to 1598
case ArConstants.INDICATOR_TYPE:
case ArConstants.INDICATOR_DISAGGREGATION_TYPE:
return indicatorColumn;
Comment on lines +34 to +35
@JsonProperty("ID")
INDICATOR_DISAGGREGATION((long) INDICATOR_DISAGGREGATION_TYPE, "ID");
Copilot AI lite review requested due to automatic review settings November 2, 2026 11:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

A critical view defect produces synthetic criterion and option rows with invalid IDs and empty labels, while the locationless-actuals branch cannot return rows because the write path never persists the required links.

7 open issues

Review effort: Lite

Comment on lines +39 to +43
CROSS JOIN LATERAL (VALUES
(0, disagg_value.parent_category_id),
(1, disagg_value.child_category_id),
(2, disagg_value.third_category_id)
) AS disagg_slot(criterion_order, option_id)
@brianbrix
brianbrix force-pushed the feature/AMP-31226/New-Disaggregation-Dimension branch from c7cb252 to ed678a1 Compare November 2, 2026 13:16
Copilot AI lite review requested due to automatic review settings November 2, 2026 13:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Two unresolved critical issues remain: criterion validation accepts category values outside the required class, and prepareMerge can mutate the source structure or dereference a null image set.

8 open issues

Review effort: Lite

Comment on lines +720 to +723
if (session.get(AmpCategoryValue.class, criterion) == null) {
throw new ApiRuntimeException(BAD_REQUEST, ApiError.toError(
"Disaggregation criterion with id " + criterion + " not found."));
}
Copilot AI lite review requested due to automatic review settings November 3, 2026 00:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Comment on lines +128 to +137
/* Locationless actuals remain visible for each linked activity. */
SELECT con.activity_id AS amp_activity_id,
aigv.original_value AS value,
aigv.type AS value_type,
aigv.original_value_date AS value_date,
ind.indicator_id AS me_indicator_id,
t.amp_theme_id AS program_id,
aidv.parent_category_id AS category_value_id,
aidv.child_category_id AS child_category_value_id,
aidv.third_category_id AS third_category_value_id,
Comment on lines +42 to +44
export const INDICATOR_DISAGGREGATION_REPORT = 'funding-indicator-disaggregation';
export const FUNDING_GROUPING_RADIO_OPTIONS = [FUNDING_DONOR, REGIONAL_REPORT, COMPONENT_REPORT, PLEDGES_REPORT,
INDICATOR_REPORT, INDICATOR_DISAGGREGATION_REPORT];
Copilot AI lite review requested due to automatic review settings November 3, 2026 08:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Two unresolved issues remain: a newly added funding-grouping option is not wired through the API and type conversion, and null image collections can still cause a critical exception in AmpStructure.prepareMerge.

11 open issues
1 resolved since last review
1 file not reviewed
  • amp/TEMPLATE/reampv2/package-lock.json: Generated file

Review effort: Lite

Comment on lines +201 to +202
aux.getImages().clear();
aux.getImages().addAll(new HashSet<>());
Copilot AI lite review requested due to automatic review settings November 3, 2026 09:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings November 3, 2026 10:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Comment on lines +23 to +24
@Interchangeable(fieldTitle = "Third Category", importable = true, pickIdOnly = true)
private AmpCategoryValue thirdCategory;

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants