I finally took some time to finish this implementation.
I created a new command called generate-issues that takes 2 parameters, <project> and <model>. The main objective of this command is to generate a set of issues from a predefined JSON model.
A common use case is:
Suppose there is a task #37, subject: "Implement some feature"
For this task we have a known set of subtasks like:
Define interfaces
Write unit tests
Write code to pass unit tests
Refactor code
We would then define a model called TDD.json like this:
{
"globals": {
"assignee": 1,
"tracker": "Task"
},
"issues": [
{"subject": "Define interfaces"},
{"subject": "Write unit tests"},
{"subject": "Write code to pass unit tests"},
{"subject": "Refactor code"}
]
}
Then we would import the model into RedmineCLI: redmine import-model <path_to_TDD.json> TDD.
Finally we would generate the subtasks for the assigned parent issue: redmine generate-issues <project> TDD --parent 37.
Aside from generate-issues and import-model, there are also list-models and remove-model commands to provide all possible use-cases regarding model management.
I hope you like this new feature. It's proven to be very useful for me.
Coverage remained the same at 100.0% when pulling 41111f893cdcc630ea35358fc904b327b046a2e1 on pedrobaracho:generate-issues-command into 1ae33593b1788bdf852e6304b8a812b3503ad46f on a11n:master.
Hi again!
I finally took some time to finish this implementation.
I created a new command called
generate-issues
that takes 2 parameters,<project>
and<model>
. The main objective of this command is to generate a set of issues from a predefined JSON model.A common use case is:
We would then define a model called
TDD.json
like this:Then we would import the model into RedmineCLI:
redmine import-model <path_to_TDD.json> TDD
.Finally we would generate the subtasks for the assigned parent issue:
redmine generate-issues <project> TDD --parent 37
.Aside from
generate-issues
andimport-model
, there are alsolist-models
andremove-model
commands to provide all possible use-cases regarding model management.I hope you like this new feature. It's proven to be very useful for me.