code-corps / code-corps/code-corps-api

RFC: Merge project `approved` and `approval_requested` flags into a single field

Open
#1,279 0 comments 0 reactions 0 assignees View on GitHub
needs clarification needs estimate RFC
Dominant language
Elixir
Stars
234
Forks
82
PR merge metrics
No merged PRs in 30d

Description

# Problem

Looking at these two fields, it really seems they serve a singular purpose.
```Elixir
# A project is created
`approved: false, approval_requested: false`
# User submits project for approval
`approved: false, approval_requested: true`
# Admin approves project
`approved: true, approval_requested :does_not_matter`
```

A single field, for example,

```Elixir
# 'created' -> 'pending_approval' -> 'approved'
field :onboarding_status, :string, null: false, default: 'created'
```

Might serve our purposes much better.

We could add an additional status of `rejected` later, with an additional field of `rejected_reason` or something.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.