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

feat: tweak grant fund settings #5807

Merged
merged 6 commits into from
Jan 23, 2020
Merged

feat: tweak grant fund settings #5807

merged 6 commits into from
Jan 23, 2020

Conversation

thelostone-mc
Copy link
Member

Description
  • grant team members cannot fund their own grant
  • fund button is made hidden for grant owner + team members
  • added new field link_to_new_grant which is set when grant
    is migrated
  • if grant has link_to_new_grant -> fund button is replaced
    with button to link to new grant.
  • funding is blocked on old grants
Steps
  • update migrate_grant.py to with the old and new grant id + run it
  • the old grant has a f-key link to the new grant
  • this can be seen on admin in read only mode
  • the old grant fund page would be blocked and instead users will be asked to visit the newer grant
Testing

Screenshot 2020-01-15 at 7 23 06 PM

Screenshot 2020-01-15 at 7 23 14 PM

Screenshot 2020-01-15 at 7 23 42 PM

Screenshot 2020-01-15 at 7 24 04 PM

Screenshot 2020-01-15 at 7 24 22 PM

- grant team members cannot fund their own grant
- fund button is made hidden for grant owner + team members
- added new field link_to_new_grant which is set when grant
  is migrated
- if grant has link_to_new_grant -> fund button is replaced
  with button to link to new grant.
- funding is blocked on old grants
@thelostone-mc
Copy link
Member Author

@owocki could you check out the migrate_grant.py file once

@codecov
Copy link

codecov bot commented Jan 15, 2020

Codecov Report

Merging #5807 into stable will decrease coverage by 0.2%.
The diff coverage is 21.6%.

Impacted file tree graph

@@            Coverage Diff             @@
##           stable    #5807      +/-   ##
==========================================
- Coverage   29.75%   29.54%   -0.21%     
==========================================
  Files         260      266       +6     
  Lines       22012    22654     +642     
  Branches     3193     3290      +97     
==========================================
+ Hits         6549     6694     +145     
- Misses      15186    15680     +494     
- Partials      277      280       +3
Impacted Files Coverage Δ
app/app/settings.py 80.54% <ø> (ø) ⬆️
app/dashboard/notifications.py 16.47% <ø> (ø) ⬆️
app/grants/admin.py 48.21% <ø> (ø) ⬆️
app/kudos/views.py 15.02% <ø> (ø) ⬆️
...pp/marketing/management/commands/share_activity.py 0% <0%> (ø) ⬆️
app/app/utils.py 22.74% <0%> (ø) ⬆️
app/townsquare/apps.py 0% <0%> (ø)
app/dashboard/router.py 33.33% <0%> (-1.4%) ⬇️
app/app/urls.py 90.38% <100%> (+0.18%) ⬆️
app/townsquare/admin.py 100% <100%> (ø)
... and 23 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update edbc44c...d3cb518. Read the comment docs.

Copy link
Contributor

@owocki owocki left a comment

Choose a reason for hiding this comment

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

'back to grant' looks kind of funny on https://bits.owocki.com/llu47w4g

left a few minor comments.. other than those LGTM

]
list_display =['pk', 'title', 'active','grant_type', 'link', 'hidden']
list_display =['pk', 'title', 'active','grant_type', 'link', 'hidden', 'migrated_to']
raw_id_fields = ['admin_profile']
Copy link
Contributor

Choose a reason for hiding this comment

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

should we add to raw_id_fields? i honestly just like the raw id field explorer more than the regular FK explorer

Copy link
Member Author

Choose a reason for hiding this comment

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

You mean it'd end up like this -> I didn't want this to be edited via admin cause I wanted to ensure this is done via migrate_grant.py script file

right now -> the migrated_to displayed in table and within the grant admin page is a read only mode

Screenshot 2020-01-16 at 2 39 27 PM

app/grants/views.py Outdated Show resolved Hide resolved
@thelostone-mc
Copy link
Member Author

image

@owocki updated it

app/grants/views.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants