Added walkProject to core. Updated classes to interface changes.

* Implemented `walkProject` on `com.jdbernard.pit.Project`
* Updated several classes to fit the new interfaces/abstract classes.
* Still not finished with XML issue repository code.
This commit is contained in:
Jonathan Bernard
2011-10-24 20:02:49 -05:00
parent b04655a428
commit 09319cb2e7
17 changed files with 41 additions and 25 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,8 +1,8 @@
#Tue, 09 Aug 2011 17:21:28 -0500
#Fri, 21 Oct 2011 16:19:53 -0500
build.dir=build
src.dir=src
build.jar=pit-cli-${application.version}.${build.number}.jar
build.number=7
build.number=9
expected.application.version=2.6.0
lib.dir=lib
release.dir=release

Binary file not shown.

View File

@ -47,7 +47,8 @@ def workingDir = new File('.')
// defaults for the issue filter/selector
def selectOpts = [
categories: ['bug', 'feature', 'task'],
status: ['new', 'validation_required'],
status: ['new', 'reassigned', 'rejected',
'resolved', 'validation_required'],
priority: 9,
projects: [],
ids: [],
@ -227,24 +228,17 @@ else if (opts.n) {
// last, changes to existing issues
else {
// change priority
if (opts.P) walkProject(issuedb, filter) {
if (opts.P) issuedb.walkProject(filter) {
it.priority = assignOpts.priority
println "[${it}] -- set priority to ${assignOpts.priority}"}
// change third
else if (opts.C) walkProject(issuedb, filter) {
else if (opts.C) issuedb.walkProject(filter) {
it.category = assignOpts.cat
println "[${it}] -- set category to ${assignOpts.category}"}
// change status
else if (opts.S) walkProject(issuedb, filter) {
else if (opts.S) issuedb.walkProject(filter) {
it.status = assignOpts.status
println "[${it}] -- set status to ${assignOpts.status}"}
}
// walk every issue and project in this project recursively and execute the
// given closure on each issue that meets the filter criteria
def walkProject(Project p, Filter filter, Closure c) {
p.eachIssue(filter, c)
p.eachProject(filter) { walkProject(it, filter, c) }
}