Change request
A change request is the only way to change an approved GSpec. It is a proposal with its differences, which someone with the right approves or rejects, and the decision is recorded with the name of the person who made it.
What a change request holds
A change request proposes the new full content for 1 to 100 specs. Each change in it is one of four kinds:
- Create a new spec.
- Edit the content of an existing spec.
- Move the Area of a spec (see Areas, applicable rules and tags).
- Retire: take a spec out of the spec. A retire cannot be reopened, and the review page shows which specs and implementation specs it will flag.
A change request has a code such as PAY-CR-45; in the CLI, 45, cr45 or PAY-CR-45 all work.
Life cycle
draft ──submit──► open ──approve──► approved
│ ├───reject────► rejected
├──── withdraw ───┴─────────────► withdrawn
└── a change request that retires its item is approved ──► replaced
| State | Meaning |
|---|---|
| draft | The author's draft; nobody has to look at it yet |
| open | Sent for review |
| approved | Approved; each change becomes a new version of its spec |
| rejected | Rejected |
| withdrawn | Taken back by the author |
| replaced | Replaced because the spec it edits was retired |
Each edit by the author is a new revision. A reviewer decides on one specific revision, so nobody approves content they have not read; if the author edits while you are reading, the Review page warns you.
Who can do what: a contributor or above proposes; only the author edits, submits, withdraws and Updates; reviewers and admins approve or reject (on the web or in the CLI), or ask for changes (only with the CLI command tmspec cr request). When several Areas have their own keepers, the signature of each group of keepers is needed; see Roles and permissions.
Out of date: the spec changed after you wrote
You write a proposal on one version of a spec. If another change request is approved in the meantime and the spec gets a new version (or moves Area), your change request becomes Out of date:
- It stays open, it is not closed.
- It cannot be approved until the author does an Update. Approving an Out of date change request is refused with a message saying an Update is needed first.
- Out of date is worked out on every read, so the list is always right for now.
Overlaps: two proposals touching one spec
An open change request shows Overlaps when another draft or open change request also edits a spec that it edits, together with the parts both edit (a criterion, the statement part...). The reviewer sees it beforehand: approving this change request will make the other one Out of date, or Replaced if this change request retires a spec that both touch.
Approving a change request does not close the other change requests on the same spec. They stay and wait for their author to Update. Only retiring a spec makes the other change requests on that spec Replaced, because nothing is left to do on that spec.
Update: bring a change request to the latest version
Update brings your change request to the spec's current version without making you write it again. tmspec splits the content into parts (a criterion, a field, a link) and compares part by part:
| Part | Result |
|---|---|
| Only the current side changed | Take the current one: label Combined |
| Only you changed | Keep yours |
| Both sides changed the same way | Keep it as is |
| Both sides changed differently | You must Choose |
The author sees a preview of the result before anything is written. When no part needs a Choose, the button is Update; when some do, the button is Save as new revision. Each part that needs a Choose shows three columns, Before (the original you based on), Latest (the current one) and Yours, with the options Keep latest, Keep yours (the default), Keep both when both sides added a criterion, or Rewrite to write it yourself. tmspec never mixes text inside one part.
If the current version changes again while you choose, nothing is written and you are asked again. Only the author of a draft or open change request can Update; anyone else is taken to the Review page.
In the CLI:
tmspec cr list --outdated # the project's change requests that are Out of date
tmspec cr update 45 # Update: succeeds if every part can be Combined
When some parts need a Choose, tmspec cr update 45 writes nothing, prints Before, Latest and Yours of each part and exits with code 6. Use --edit to choose in an editor, or --file to pass the content you chose (see Propose a change). For a retire or an Area move that conflicts, Update cannot combine: you choose to keep your change on the newest version or drop it (--drop).