-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsourceOutgoingScript
67 lines (60 loc) · 2.23 KB
/
sourceOutgoingScript
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
if (issue.status.name != "Backlog") {
replica.key = issue.key
replica.type = issue.type
replica.assignee = issue.assignee
replica.reporter = issue.reporter
replica.summary = issue.summary
replica.description = issue.description
replica.labels = issue.labels
replica.comments = issue.comments
replica.resolution = issue.resolution
replica.status = issue.status
replica.parentId = issue.parentId
replica.priority = issue.priority
replica.attachments = issue.attachments
replica.project = issue.project
//This defines the custom field Work Order as a field that should be included in the outgoing sync.
replica."Work Order" = issue."Work Order"
/*
commenting this out because some docs say this status map should go on destination side.
def statusMap = [
"Dev Ready" : "To Do",
"In Progress" : "In Progress",
"Ready for QA" : "Ready for QA",
"UAT" : "UAT",
"Done" : "Done",
"Closed/NoWork" : "Done",
]
replica.status = statusMap[issue.status.name]?: issue.status.name
*/
} else {
replica.key = null
replica.type = null
replica.assignee = null
replica.reporter = null
replica.summary = null
replica.description = null
replica.labels = null
replica.comments = null
replica.resolution = null
replica.status = null
replica.parentId = null
replica.priority = null
replica.attachments = null
replica.project = null
replica.summary = null
replica.description = null
}
/*
Uncomment these lines if you want to send the full list of versions and components of the source project.
replica.project.versions = []
replica.project.components = []
*/
/*
Custom Fields (CF)
How to send any field value from the source side to the destination side.
1/ Add the value to the replica object using the Display Name of the specific field.
2/ Uncomment this next statement out and change accordingly:
replica.customFields."CF Name" = issue.customFields."CF Name"
*/
// Exalate API Reference Documentation: https://docs.exalate.com/docs/exalate-api-reference-documentation