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: Add is_ticket_form_enabled field #5934

Merged
merged 1 commit into from Jun 2, 2019

Conversation

@uds5501
Copy link
Contributor

commented May 20, 2019

Fixes #5933

Checklist

  • I have read the Contribution & Best practices Guide and my PR follows them.
  • My branch is up-to-date with the Upstream development branch.
  • The unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • All the functions created/modified in this PR contain relevant docstrings.

Changes proposed in this pull request:

  • add is_ticket_form_enabled field in event model
  • provide the migration file

@auto-label auto-label bot added the feature label May 20, 2019

@uds5501 uds5501 referenced this pull request May 20, 2019
3 of 5 tasks complete
@codecov

This comment has been minimized.

Copy link

commented May 20, 2019

Codecov Report

Merging #5934 into development will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@              Coverage Diff               @@
##           development   #5934      +/-   ##
==============================================
+ Coverage        66.39%   66.4%   +<.01%     
==============================================
  Files              286     286              
  Lines            13958   13961       +3     
==============================================
+ Hits              9268    9271       +3     
  Misses            4690    4690
Impacted Files Coverage Δ
app/api/schema/events.py 89.79% <100%> (+0.06%) ⬆️
app/models/event.py 81.64% <100%> (+0.14%) ⬆️

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 ad322e3...0b78a68. Read the comment docs.

@uds5501

This comment has been minimized.

Copy link
Contributor Author

commented May 20, 2019

def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('events', sa.Column('is_ticket_form_enabled', sa.Boolean(), server_default='False', nullable=False))
op.add_column('events_version', sa.Column('is_ticket_form_enabled', sa.Boolean(), server_default='False', autoincrement=False, nullable=True))

This comment has been minimized.

Copy link
@shreyanshdwivedi

shreyanshdwivedi May 20, 2019

Member

@uds5501 don't you think autoincrement=False should be removed and nullable should be false here?

@CosmicCoder96
Copy link
Collaborator

left a comment

@uds5501 What will be the implications of this field being false for the past events? If default is false, then all the events will have ticketing form disabled.

@uds5501

This comment has been minimized.

Copy link
Contributor Author

commented May 20, 2019

@CosmicCoder96 at the moment the order form is created despite the value of this field in the frontend. Although you are right, the default value of this property should be true, we want to have an activated attendee form, I will update this. Also, @shreyanshdwivedi thanks for pointing that out, will be updating that as well

@uds5501 uds5501 force-pushed the uds5501:fix-5933 branch from 2305abd to 0b78a68 May 20, 2019

@shreyanshdwivedi
Copy link
Member

left a comment

LGTM 👍

@iamareebjamal iamareebjamal merged commit fdf1bd4 into fossasia:development Jun 2, 2019

5 checks passed

Codacy/PR Quality Review Up to standards. A positive pull request.
Details
Hound No violations found. Woof!
codecov/patch 100% of diff hit (target 66.39%)
Details
codecov/project 66.4% (+<.01%) compared to ad322e3
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
5 participants
You can’t perform that action at this time.