Skip to content

Removing evidence from promise does not update promise #75

Closed
2 of 2 issues completed
Closed

Description

@melkuo

Describe the bug
In Admin, I updated an evidence to remove a promise from it. However, in the UI, I still see the evidence attached to the promise.

To Reproduce
Steps to reproduce the behavior:

  1. Go to admin and search for https://www.parl.ca/legisinfo/en/bill/45-1/C-202
  2. Click on 'Update Evidence'
  3. Go to Tracker /promise/LPC_20250419_OTHER_71c8234b
  4. Still see evidence

Expected behavior

  • Promise should be removed from the evidence
  • Evidence should be removed from the promise
  • Progress should be recalculated for the promise

Sub-issues

Sub-issues

2 of 2 Issues completed
Loading 2 sub-issues

Activity

  1. added theissue type on Jun 9, 2025
  2. self-assigned this
    on Jun 9, 2025
  3. thomas-hul commented on Jun 11, 2025

    @thomas-hul
    Contributor

    Confirmed the promise (LPC_20250419_OTHER_71c8234b) has been removed from evidence item (https://www.parl.ca/legisinfo/en/bill/45-1/C-202).

    When inspecting and editing the promise I noticed that there was an area titled "Linked Evidence ID's" and it looks like the Bill C202 is still included in the linked evidence. I've since tried to remove it to see if it effects anything on the promises page here: https://www.buildcanada.com/promise/LPC_20250419_OTHER_71c8234b. Nothing seemed to occur which makes me wonder if there is a similar bi-directional data problem with when the linked_evidence gets changed that the actual promise page will need to be updated as well.

    Hopefully not but Id advise to review the whole editing workflow from end to end before we start making any big data changes so that we don't have to syncing issues.

    See screenshot.

    Image

    I reviewed the update logic and confirmed that the backend update removes the promise ID from the evidence item, but does not remove the evidence ID from the promise’s linked_evidence field. i.e., removing a promise from an evidence item doesn’t update the associated promise’s linked_evidence array.

    I’ve written a patch to address this but ran into a few frontend bugs that are stopping me from testing. Working branch bug/issue-75-admin-update-issue

    Draft PR [WIP] with patch
    https://github.com/BuildCanada/PromiseTracker/pull/87

  4. melkuo commented on Aug 27, 2025

    @melkuo
    ContributorAuthor

    I believe this is fixed now with BuildCanada/OutcomeTrackerAPI#28

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions