alan-turing-institute / nowwhat

Provide an overview of which projects REG are doing right now, reimagination of whatnow
MIT License
0 stars 0 forks source link

Every Forecast project has a unique GitHub issue number #32

Closed jemrobinson closed 2 years ago

jemrobinson commented 2 years ago

User story

In order to check that every Forecast project has a unique ID of the form hut23-[:digit:]+ I want to run a function that returns 0 when this requirement is met or returns an error message with the list of projects that do not meet the requirement.

Details

Example implementation

> nowwhat
0
> nowwhat
Error: the following projects have no project code
Forecast ID | Client        | Project Name
----------------------------------------------
12345       | Health        | Live Forever
23456       | Public policy | Solve Democracy

Error: the following projects have identical project codes
Forecast ID | Client        | Project Name | Project Code
----------------------------------------------
12345       | Health        | Find Answer | hut23-42
23456       | Public policy | Find Question | hut23-42

Error: the following projects have invalid project codes
Forecast ID | Client        | Project Name    | Project Code
---------------------------------------------------------
23456       | Public policy | Do Training     | bob-123

Acceptance criteria

In this section, write about what "done" looks like for this story

Updates

Any updates from further down the thread are encouraged so people can easily see the status of this issue

triangle-man commented 2 years ago

We changed the condition to "every Forecast project has a valid code of the form hut23-NNN.