sappho-data-publisher 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,9 +22,37 @@ module Sappho
|
|
22
22
|
|
23
23
|
def gatherData pageData, parameters
|
24
24
|
checkLoggedIn
|
25
|
-
|
26
|
-
|
27
|
-
|
25
|
+
# process a single issue fetch request
|
26
|
+
if id = parameters['id']
|
27
|
+
@logger.info "fetching Jira issue #{id}"
|
28
|
+
getJiraIssueDetails @appServer.getIssue(@token, id), pageData
|
29
|
+
end
|
30
|
+
# process a multi-issue, via filter, fetch request
|
31
|
+
if filterId = parameters['filterId']
|
32
|
+
@logger.info "fetching all Jira issues included in filter #{filterId}"
|
33
|
+
issues = @appServer.getIssuesFromFilter @token, filterId
|
34
|
+
pageData['issues'] = cookedIssues = []
|
35
|
+
issues.each { |issue|
|
36
|
+
cookedIssue = { 'key' => issue['key'] }
|
37
|
+
getJiraIssueDetails issue, cookedIssue
|
38
|
+
cookedIssues << cookedIssue
|
39
|
+
}
|
40
|
+
end
|
41
|
+
# process a group membership fetch request
|
42
|
+
if groupName = parameters['groupName']
|
43
|
+
@logger.info "fetching membership of Jira user group #{groupName}"
|
44
|
+
group = @appServer.getGroup @token, groupName
|
45
|
+
pageData['users'] = users = []
|
46
|
+
group['users'].each {
|
47
|
+
|user| users << {
|
48
|
+
'username' => user['name'],
|
49
|
+
'fullName' => user['fullname'],
|
50
|
+
'email' => user['email']
|
51
|
+
}}
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
def getJiraIssueDetails issue, pageData
|
28
56
|
pageData['summary'] = summary = issue['summary']
|
29
57
|
pageData['pagename'] = summary unless pageData['pagename']
|
30
58
|
pageData['description'] = issue['description']
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sappho-data-publisher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Andrew Heald
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-
|
18
|
+
date: 2012-06-22 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: rake
|