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

New Budget's phase to publish investment prices #2296

Merged
merged 11 commits into from Jan 10, 2018

Conversation

bertocq
Copy link
Collaborator

@bertocq bertocq commented Jan 10, 2018

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 & 6772f94

  • Creating a published_prices? helper function at Budget model, as well as a phases constant to know which phases should have prices published 21d6ce5

  • Refactoring existing should_show_price? and should_show_price_info? Budget's helper functions to reflect new logic 3340917

Screenshots

A gif is worth a thousand screenshots

  1. 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

  2. We check that changing Budget's phase to "Publishing project prices" both price & price explanation are shown on both list and detail
    price_show

Test

  • Added investment feature specs to check price showing rules 1d6c303
  • Increased Budget model specs cb1151f
  • Increased Investment model specs 3563b87
  • Removed a test scenario that was deprecated with the new showing logic f350b99

Deployment

As usual

Warnings

Some small refactors on the side to make changes easier and code more clean:

@bertocq bertocq changed the title Feature/2278#budget price show phase New Budget's phase to publish investment prices Jan 10, 2018
@bertocq bertocq force-pushed the feature/2278#budget_price_show_phase branch from a557f64 to 3340917 Compare January 10, 2018 10:26
Copy link
Contributor

@MariaCheca MariaCheca left a comment

Choose a reason for hiding this comment

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

Looking cool

Copy link
Member

@voodoorai2000 voodoorai2000 left a comment

Choose a reason for hiding this comment

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

Beautiful!

@bertocq bertocq merged commit 71e045f into master Jan 10, 2018
@bertocq bertocq deleted the feature/2278#budget_price_show_phase branch January 10, 2018 22:46
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants