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

Only change budget slugs if its on draft phase #2434

Merged
merged 5 commits into from
Feb 5, 2018
Merged

Conversation

bertocq
Copy link
Collaborator

@bertocq bertocq commented Feb 4, 2018

Where

What

If a Budget is not on Drafting phase, the public urls for the Budget/Budget::Headings/Budget::Groups/Budget::Investments should not change as if those are published online/offline they will send users to 404 errors.

How

Only set a slug value if its not present or conditions are met (budget must be drafting) e0871e5

Screenshots

No need, backend only feature. See tests

Test

Deployment

As usual

Warnings

This new behaviour may be as unintuitive for the admin as the current one... we're not showing the budget/budget group/budget heading slugs anywhere at the admin panel/forms... neither communicating when slugs are changed. I've created an issue to allow slug view/change (with clear & big disclaimers & warnings) here #2433

@bertocq bertocq changed the title Slug generation logic Only change budget slugs if its on draft phase Feb 4, 2018
Slugs should only be updated on certain conditions, we need a trait that
meets that conditions and the name of the trait passed as a mandatory &
named argument on the sluggable concern
@bertocq bertocq merged commit c16e42e into master Feb 5, 2018
@bertocq bertocq deleted the slug_generation_logic branch February 5, 2018 14:36
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.

👍

clairezed pushed a commit to CDJ11/CDJ that referenced this pull request Jun 26, 2018
…ogic

Only change budget slugs if its on draft phase
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