forked from gloob/redmine-google_apps_scripts
-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.js
67 lines (54 loc) · 1.73 KB
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*
* Connector to Redmine from Google Apps Scripts platform.
*
* Copyright (c) 2011,2012 Emergya
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* Author: Alejandro Leiva <[email protected]>
*
*/
// Some useful constants
var PROJECT_ID = 'your_project_id';
var TRACKER_ID = 'your_tracker_id';
// Redmine class tests
function redmine_getIssues() {
var redmine = new Redmine();
var issues = redmine.getIssues(PROJECT_ID);
Logger.log('Issues: ' + issues.length);
Logger.log(issues);
}
function redmine_getProjects() {
var redmine = new Redmine();
var projects = redmine.getProjects();
Logger.log('Projects: ' + projects.length);
Logger.log(projects);
}
function redmine_getProject() {
var redmine = new Redmine();
var project = redmine.getProject(PROJECT_ID);
Logger.log(project);
}
function redmine_getTimeEntries() {
var redmine = new Redmine();
var time_entries = redmine.getTimeEntries(PROJECT_ID);
Logger.log('Time entries: ' + time_entries.length);
Logger.log(time_entries);
}
function redmine_getIssuesByTracker() {
var redmine = new Redmine();
var issues = redmine.getIssuesByTracker(PROJECT_ID, TRACKER_ID);
Logger.log('Issues: ' + issues.length);
Logger.log(issues);
}
function redmine_issueUpdate() {
var redmine = new Redmine();
}