This repository has been archived by the owner on Feb 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Old bucket state model
chime-mu edited this page Oct 24, 2017
·
1 revision
These are the states a bucket could be in:
-
Idea - New bucket. Only used for discussion at this point. The target is not fixed yet.
status == 'draft'
- It can transition to Funding or Cancelled.
-
Funding - People can start contributing to the bucket. The bucket is not yet fully funded and not cancelled.
-
target
is now fixed and can’t be changed. - If a
contribution
is added that makes the sum of contribution go overtarget
, it will be adjusted down. Thus no buckets should have contributions that are overtarget
. This is an invariant. - If a contribution is added that makes the sum of contributions equal to
target
thestatus
get set tofunded
- The bucket can be archived (UI:
archiveBucketDialog
) or finished (UI:finishBucketDialog
) - If it gets archived and
status == 'live'
the dialog states the money will be returned. If it’s not live there’s no warning. This is also what happens inbucket_service.rb
- If it gets finished and
status == 'live'
the dialog states it’s no longer possible to add money to the bucket. This is done through settingstatus == 'funded'
status == 'live'
- It can transition to Funded or Cancelled.
-
-
Funded - The bucket is fully funded. It’s not archived.
status == 'funded'
- If it’s archived the
status
doesn’t change. Thearchived_at
timestamp gets set. - It can transition to Archived (it can't transition to Cancelled).
-
Archived - The bucket is funded and then archived, so it’s less visible on the group page.
-
archived_at
is set. -
status == 'funded'
, the bucket was funded before it was archived and the contributions are still present.
-
-
Cancelled - The bucked is cancelled. It’s not possible to contribute to it. Any previous contributions has been deleted. It’s less visible on the group page.
-
archived_at
is set. (status == 'draft') || (status = 'live')
- If
status == 'live'
the bucket was in the process of being funded when it was archived and all contributions are deleted. - If
status == 'draft'
no contributions was ever added.
-