Skip to content
This repository has been archived by the owner on Sep 3, 2019. It is now read-only.

Commit

Permalink
[1.1.4] Added question about changed requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
isnifer committed Aug 28, 2018
1 parent 7e27654 commit 763d8c6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
14 changes: 10 additions & 4 deletions constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ const REGULAR_TYPES = {
TOMORROW: '3',
DISTRACTED: '4',
BLOCK: '5',
EST_CHANGES: '6',
TASK_WAS_CHANGED: '6',
EST_CHANGES: '7',
}

const REFINEMENT_TYPES = {
Expand Down Expand Up @@ -62,7 +63,7 @@ const simpleQuestionsReaction = ({ question, response }) => {
return moveToTheNextQustion(question)
}

const distractedBlockQuestionsReaction = ({ question, response }) => {
const simpleSummaryQuestionsReaction = ({ question, response }) => {
if (response !== NEXT_QUESTION) {
// If response is a task number
if (TASK_NUMBER_REGEX.test(response)) {
Expand Down Expand Up @@ -102,12 +103,17 @@ const REGULAR_QUESTIONS = {
[REGULAR_TYPES.DISTRACTED]: {
name: REGULAR_TYPES.DISTRACTED,
message: 'Было отвлечение на задачу',
then: distractedBlockQuestionsReaction,
then: simpleSummaryQuestionsReaction,
},
[REGULAR_TYPES.BLOCK]: {
name: REGULAR_TYPES.BLOCK,
message: 'Меня блокирует',
then: distractedBlockQuestionsReaction,
then: simpleSummaryQuestionsReaction,
},
[REGULAR_TYPES.TASK_WAS_CHANGED]: {
name: REGULAR_TYPES.TASK_WAS_CHANGED,
message: 'В процессе выполнения изменились требования для задачи',
then: simpleSummaryQuestionsReaction,
},
[REGULAR_TYPES.EST_CHANGES]: {
name: REGULAR_TYPES.EST_CHANGES,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tipsi-reporter",
"version": "1.1.3",
"version": "1.1.4",
"description": "CLI tool for daily reports",
"main": "index.js",
"bin": {
Expand Down
4 changes: 4 additions & 0 deletions parsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ const summaryLines = [
name: '[BLOCK]',
reducer: distractedBlockReducer,
},
{
name: '[TASK_WAS_CHANGED]',
reducer: distractedBlockReducer,
},
{
name: '[EST_CHANGES]',
reducer: groupName => (acc, answer) => (
Expand Down

0 comments on commit 763d8c6

Please sign in to comment.