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
New Budget's phase to publish investment prices #2296
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…udget::Investment & usage
bertocq
changed the title
Feature/2278#budget price show phase
New Budget's phase to publish investment prices
Jan 10, 2018
bertocq
force-pushed
the
feature/2278#budget_price_show_phase
branch
from
January 10, 2018 10:26
a557f64
to
3340917
Compare
MariaCheca
approved these changes
Jan 10, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking cool
voodoorai2000
approved these changes
Jan 10, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beautiful!
This was referenced Jan 11, 2018
clairezed
pushed a commit
to CDJ11/CDJ
that referenced
this pull request
Jun 26, 2018
…et_price_show_phase New Budget's phase to publish investment prices
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Where
What
Sometimes admins want to make all selected investments's prices & explanations public at the same time, but without enabling the Final Voting phase, so there can be some feedback and corrections.
This PR allows admins to switch a Budget's phase from Valuating projects to a new phase Publishing projects prices (without having to change to Balloting projects) to make the prices & prices explanations public both on the Budget's investments list and on the investments detail page.
How
Adding a new Budget phase
publishing_prices
922318b & 6772f94Creating a
published_prices?
helper function at Budget model, as well as a phases constant to know which phases should have prices published 21d6ce5Refactoring existing
should_show_price?
andshould_show_price_info?
Budget's helper functions to reflect new logic 3340917Screenshots
A gif is worth a thousand screenshots
We check that a selected investment with price & price explanation, on a Budget at "Valuating projects" phase doesn't show them neither on list or detail
We check that changing Budget's phase to "Publishing project prices" both price & price explanation are shown on both list and detail
Test
Deployment
As usual
Warnings
Some small refactors on the side to make changes easier and code more clean: