gen-tj 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +14 -0
- data/lib/gen-tj/gen-tj.rb +1 -1
- data/lib/gen-tj/genbuglist.rb +16 -10
- data/lib/gen-tj/task.rb +1 -1
- data/lib/gen-tj/version.rb +1 -1
- metadata +4 -4
data/README.rdoc
CHANGED
@@ -3,6 +3,16 @@
|
|
3
3
|
This generates Taskjuggler (www.taskjugger.org) plans from (carefully
|
4
4
|
designed) FATE entries combined with Bugzilla assignments.
|
5
5
|
|
6
|
+
== Usage
|
7
|
+
|
8
|
+
Check the samples/ directory for more information.
|
9
|
+
|
10
|
+
== Install
|
11
|
+
|
12
|
+
Install it with
|
13
|
+
|
14
|
+
gem install gen-tj
|
15
|
+
|
6
16
|
== Commands
|
7
17
|
=== gen-buglist -- generate taskjuggler plans from Bugzilla
|
8
18
|
|
@@ -34,3 +44,7 @@ Usage
|
|
34
44
|
Combining the three tasks (resources, buglist, tasklist) can easily be
|
35
45
|
done with a Makefile as provided in the samples directory.
|
36
46
|
|
47
|
+
== Changelog
|
48
|
+
|
49
|
+
* v0.0.1 Initial release
|
50
|
+
* v0.0.2 Add priority to bug tasks
|
data/lib/gen-tj/gen-tj.rb
CHANGED
data/lib/gen-tj/genbuglist.rb
CHANGED
@@ -38,24 +38,30 @@ module GenTJ
|
|
38
38
|
|
39
39
|
# sort bugs according to priority
|
40
40
|
|
41
|
-
prios =
|
41
|
+
prios = []
|
42
42
|
|
43
43
|
bugs.each do |bug|
|
44
|
-
|
45
|
-
|
44
|
+
pval = 0 # use index 0 for unprioritized
|
45
|
+
if bug.priority =~ /P([\d]+).*/
|
46
|
+
pval = $1.to_i + 1
|
47
|
+
end
|
48
|
+
prios[pval] ||= []
|
49
|
+
prios[pval] << bug
|
46
50
|
end
|
47
51
|
|
48
52
|
puts "task bugs \"Bugs\" {"
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
puts "task p#{
|
55
|
-
|
53
|
+
prio = 900
|
54
|
+
# iterate over prios array, start with 1 (p1 bugs), end with 0 (unprioritized)
|
55
|
+
((1..(prios.size-1)).to_a << 0).each do |i|
|
56
|
+
bugs = prios[i]
|
57
|
+
next if bugs.nil? || bugs.empty?
|
58
|
+
puts "task p#{(i==0)?'none':i}_bugs \"Bugs with prio #{bugs.first.priority}\" {"
|
59
|
+
puts "priority #{prio}"
|
60
|
+
bugs.each do |bug|
|
56
61
|
puts bug.to_tj
|
57
62
|
end
|
58
63
|
puts "}"
|
64
|
+
prio -= 100
|
59
65
|
end
|
60
66
|
puts "}"
|
61
67
|
end
|
data/lib/gen-tj/task.rb
CHANGED
data/lib/gen-tj/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gen-tj
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- "Klaus K\xC3\xA4mpf"
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-09-
|
18
|
+
date: 2011-09-29 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|