Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport] Budget execution list #2864

Merged
merged 32 commits into from
Nov 7, 2018
Merged

Conversation

MariaCheca
Copy link
Contributor

@MariaCheca MariaCheca commented Aug 27, 2018

References

Backport AyuntamientoMadrid#1543
Related issue #2583
Commit AyuntamientoMadrid/consul@8349117 was backported on this pull request because the related code wasn't in consul when we opened #2911.

@MariaCheca MariaCheca force-pushed the backport_1543-budget_execution_list branch from ff553b4 to 6347062 Compare August 28, 2018 13:49
@javierm
Copy link
Member

javierm commented Sep 19, 2018

⚠️ When merging this pull request, consider applying some of the changes in commit AyuntamientoMadrid/consul@8349117 either here or in PR #2911, since that commit fixes a small typo in this pull request.

This new tab will show all winner investments projects with milestones
@javierm javierm force-pushed the backport_1543-budget_execution_list branch 3 times, most recently from 9a2547b to 70d39a5 Compare November 5, 2018 17:02
@javierm javierm force-pushed the backport_1543-budget_execution_list branch from 70d39a5 to dbb57cf Compare November 5, 2018 17:05
javierm and others added 20 commits November 6, 2018 13:02
So it's in the same lines as in Madrid's repository.
This commit makes 3 changes:

1. Extracts a query into a helper for clarity and DRYness

2. Adds a `.where` clause to filter investments based on their
(current) milestone status

3. Fixes a bug where investments would be rendered as many times as
milestones associated to an investment
The page should not show any headings which don't have any
winning investments. The "no content" message should only be
shown when there are no headings with investments to avoid an
otherwise blank page.

__Note:__ in the main @headings query, _both_ #includes and #joins
are needed to:
 1. eager load all necessary data (#includes)
and
 2. to perform an INNER JOIN on milestones to filter out investments
with no milestones (#joins).
Spending proposals did not have a winner attribute, instead winners
where calculated dynamically looking at votes

Removing this condition, so that we can see investment for the 2016
participatory budget which used spending proposals
@javierm javierm force-pushed the backport_1543-budget_execution_list branch from dbb57cf to ab870c7 Compare November 6, 2018 12:03
@javierm javierm force-pushed the backport_1543-budget_execution_list branch from c1829b3 to 9bacf39 Compare November 6, 2018 12:19
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.

None yet

6 participants