Skip to content

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

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

brianbrix wants to merge 49 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
Replace image clearing and adding with a direct HashSet assignment.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings October 29, 2026 07:41
brianbrix and others added 3 commits October 29, 2026 10:42
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…tion-Dimension' into feature/AMP-31226/New-Disaggregation-Dimension

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

Four critical active findings remain, including incorrect activity-ID fallback behavior, a missing Level 2 database view, shallow-clone image corruption, and a sequence collision risk.

1 open issue
5 resolved since last review

Review effort: Lite

Copilot AI lite review requested due to automatic review settings October 29, 2026 07:48

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

Critical link-generation and structure-cloning defects can produce incorrect entity links and delete source images, while the missing third-category dependency check can cause protected deletions to fail with server errors.

1 open issue
1 previously missed issue

In code that hasn't changed since last review

Medium severity Check third-category references before option deletion

amp/​src/​main/​resources/​xmlpatches/​4.0/​AMP-31226-add-third-disaggregation-category.xml:12

The new third-category foreign key is not included in DisaggregationService.isOptionLinkedToIndicator, which still checks only parentCategory and childCategory. Deleting an option referenced only by third_category_id will bypass the API's protection and then fail on the FK at flush (or surface as a 500); include thirdCategory.id in that query.

1 resolved since last review

Review effort: Lite

Copilot AI lite review requested due to automatic review settings October 29, 2026 08:03

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 shows that AmpStructure.clone() aliases the source image set, so merging can corrupt the original structure; this must be fixed before approval.

No open issues 🎉

1 resolved since last review

Review effort: Lite

Copilot AI lite review requested due to automatic review settings October 29, 2026 17:55

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

Critical unresolved issues prevent the indicator modals from being built and make AmpStructure cloning corrupt the source activity during merges.

2 open issues

Review effort: Lite

import axios from 'axios';
import Accordion from 'react-bootstrap/Accordion';
import initialTranslations from '../../config/initialTranslations.json';
import { buildThreeDisaggregationValues, hasEnteredDisaggregationValue } from '../../utils/disaggregation';
import lodash from 'lodash';
import axios from 'axios';
import initialTranslations from '../../config/initialTranslations.json';
import { buildThreeDisaggregationValues, hasEnteredDisaggregationValue } from '../../utils/disaggregation';
Copilot AI lite review requested due to automatic review settings October 29, 2026 18:46

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 shallow-clone bug causes image collections to be shared and mutated during prepareMerge, corrupting the original activity.

2 open issues

Review effort: Lite

Copilot AI lite review requested due to automatic review settings October 29, 2026 19:58

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 because AmpStructure.clone() can clear the source activity version’s shared image set, potentially losing attachments during version merge.

2 open issues

Review effort: Lite

Copilot AI lite review requested due to automatic review settings October 30, 2026 04:20

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 finding remains in AmpStructure.clone(): its shallow-copied image set is mutated during cloning, potentially corrupting the source activity during a merge.

2 open issues

Review effort: Lite

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