Skip to content
This repository has been archived by the owner on Feb 20, 2020. It is now read-only.

Old bucket state model

chime-mu edited this page Oct 24, 2017 · 1 revision

The state model for bucket before the 2017 changes

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 over target, it will be adjusted down. Thus no buckets should have contributions that are over target. This is an invariant.
    • If a contribution is added that makes the sum of contributions equal to target the status get set to funded
    • 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 in bucket_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 setting status == '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. The archived_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.
Clone this wiki locally