mantis-matrix-integration – Diff between revs 2 and 3
?pathlinks?
Rev 2 | Rev 3 | |||
---|---|---|---|---|
Line 69... | Line 69... | |||
69 | |
69 | |
|
70 | function bug_report_update($event, $bug, $bug_id) { |
70 | function bug_report_update($event, $bug, $bug_id) { |
|
Line 71... | Line 71... | |||
71 | $this->skip = $this->skip || gpc_get_bool('matrix_skip'); |
71 | $this->skip = $this->skip || gpc_get_bool('matrix_skip'); |
|
72 | |
72 | |
|
73 | $project = project_get_name($bug->project_id); |
73 | $project = project_get_name($bug->project_id); |
|
74 | //$url = string_get_bug_view_url_with_fqdn($bug_id); |
74 | $url = string_get_bug_view_url_with_fqdn($bug->id); |
|
- | 75 | //$summary = $this->format_summary($bug); |
||
75 | //$summary = $this->format_summary($bug); |
76 | $reporter = '@' . user_get_name(auth_get_current_user_id()); |
|
- | 77 | $msg = sprintf( |
||
76 | $reporter = '@' . user_get_name(auth_get_current_user_id()); |
78 | plugin_lang_get($event === 'EVENT_REPORT_BUG' ? 'bug_created' : 'bug_updated'), |
|
- | 79 | $project, |
||
- | 80 | $reporter, |
||
77 | $msg = sprintf(plugin_lang_get($event === 'EVENT_REPORT_BUG' ? 'bug_created' : 'bug_updated'), |
81 | $url, |
|
78 | $project, $reporter, $bug_id //, $url, $summary |
82 | $bug->id |
|
79 | ); |
83 | ); |
|
Line 80... | Line 84... | |||
80 | $this->notify($msg); |
84 | $this->notify($msg); |
|
Line 91... | Line 95... | |||
91 | |
95 | |
|
92 | function bug_deleted($event, $bug_id) { |
96 | function bug_deleted($event, $bug_id) { |
|
Line 93... | Line 97... | |||
93 | $this->skip = $this->skip || gpc_get_bool('matrix_skip'); |
97 | $this->skip = $this->skip || gpc_get_bool('matrix_skip'); |
|
- | 98 | |
||
94 | |
99 | $bug = bug_get($bug_id); |
|
95 | $bug = bug_get($bug_id); |
100 | $url = string_get_bug_view_url_with_fqdn($bug->id); |
|
96 | $project = project_get_name($bug->project_id); |
101 | $project = project_get_name($bug->project_id); |
|
- | 102 | $reporter = '@' . user_get_name(auth_get_current_user_id()); |
||
97 | $reporter = '@' . user_get_name(auth_get_current_user_id()); |
103 | //$summary = $this->format_summary($bug); |
|
- | 104 | $msg = sprintf( |
||
- | 105 | plugin_lang_get('bug_deleted'), |
||
- | 106 | $project, |
||
- | 107 | $reporter, |
||
- | 108 | $url, |
||
98 | //$summary = $this->format_summary($bug); |
109 | $bug->id |
|
99 | $msg = sprintf(plugin_lang_get('bug_deleted'), $project, $reporter, $bug_id /* $summary */); |
110 | ); |
|
Line 100... | Line 111... | |||
100 | $this->notify($msg); |
111 | $this->notify($msg); |
|
101 | } |
112 | } |
|
Line 102... | Line 113... | |||
102 | |
113 | |
|
103 | function bugnote_add_edit($event, $bug_id, $bugnote_id) { |
114 | function bugnote_add_edit($event, $bug_id, $bugnote_id) { |
|
104 | $this->skip = $this->skip || gpc_get_bool('matrix_skip'); |
115 | $this->skip = $this->skip || gpc_get_bool('matrix_skip'); |
|
105 | |
116 | |
|
106 | $bug = bug_get($bug_id); |
117 | $bug = bug_get($bug_id); |
|
107 | //$url = string_get_bugnote_view_url_with_fqdn($bug_id, $bugnote_id); |
118 | $url = string_get_bugnote_view_url_with_fqdn($bug_id, $bugnote_id); |
|
- | 119 | $project = project_get_name($bug->project_id); |
||
108 | $project = project_get_name($bug->project_id); |
120 | //$summary = $this->format_summary($bug); |
|
- | 121 | $reporter = '@' . user_get_name(auth_get_current_user_id()); |
||
109 | //$summary = $this->format_summary($bug); |
122 | //$note = bugnote_get_text($bugnote_id); |
|
- | 123 | $msg = sprintf( |
||
- | 124 | plugin_lang_get($event === 'EVENT_BUGNOTE_ADD' ? 'bugnote_created' : 'bugnote_updated'), |
||
110 | $reporter = '@' . user_get_name(auth_get_current_user_id()); |
125 | $project, |
|
111 | //$note = bugnote_get_text($bugnote_id); |
126 | $reporter, |
|
112 | $msg = sprintf(plugin_lang_get($event === 'EVENT_BUGNOTE_ADD' ? 'bugnote_created' : 'bugnote_updated'), |
127 | $url, |
|
Line 113... | Line 128... | |||
113 | $project, $reporter, $bug_id /*$url, $summary, $note */ |
128 | $bug_id |
|
114 | ); |
129 | ); |
|
Line 115... | Line 130... | |||
115 | $this->notify($msg); |
130 | $this->notify($msg); |
|
116 | } |
131 | } |
|
117 | |
132 | |
|
118 | function bugnote_deleted($event, $bug_id, $bugnote_id) { |
133 | function bugnote_deleted($event, $bug_id, $bugnote_id) { |
|
119 | $this->skip = $this->skip || gpc_get_bool('matrix_skip'); |
134 | $this->skip = $this->skip || gpc_get_bool('matrix_skip'); |
|
- | 135 | |
||
120 | |
136 | $bug = bug_get($bug_id); |
|
- | 137 | $project = project_get_name($bug->project_id); |
||
- | 138 | $url = string_get_bug_view_url_with_fqdn($bug->id); |
||
- | 139 | //$summary = $this->format_summary($bug); |
||
- | 140 | $reporter = '@' . user_get_name(auth_get_current_user_id()); |
||
- | 141 | $msg = sprintf( |
||
121 | $bug = bug_get($bug_id); |
142 | plugin_lang_get('bugnote_deleted'), |
|
122 | $project = project_get_name($bug->project_id); |
143 | $project, |
|
Line 123... | Line 144... | |||
123 | //$url = string_get_bug_view_url_with_fqdn($bug_id); |
144 | $reporter, |
|
124 | //$summary = $this->format_summary($bug); |
145 | $url, |