|
141 | 141 | <b-input-group-form-input v-if="this.publisherClass === 'org.dependencytrack.notification.publisher.JiraPublisher'" id="input-jira-ticket-type" |
142 | 142 | :label="$t('admin.jira_ticket_type')" :required="true" type="text" v-model="jiraTicketType" lazy="true" |
143 | 143 | v-debounce:750ms="updateNotificationRule" :debounce-events="'keyup'" /> |
144 | | - <b-input-group-form-input v-if="this.publisherClass === 'org.dependencytrack.notification.publisher.JiraPublisher'" id="input-jira-project" |
145 | | - :label="$t('admin.jira_project_key')" :required="true" type="text" v-model="jiraProjectKey" lazy="true" |
146 | | - v-debounce:750ms="updateNotificationRule" :debounce-events="'keyup'" /> |
147 | 144 | <b-form-group v-if="this.publisherClass === 'org.dependencytrack.notification.publisher.SendMailPublisher'" |
148 | 145 | id="teamDestinationList" :label="this.$t('admin.select_team_as_recipient')"> |
149 | 146 | <div class="list group"> |
|
224 | 221 | notificationLevel: row.notificationLevel, |
225 | 222 | destination: this.parseDestination(row), |
226 | 223 | jiraTicketType: this.parseJiraTicketType(row), |
227 | | - jiraProjectKey: this.parseJiraProjectKey(row), |
228 | 224 | scope: row.scope, |
229 | 225 | notifyOn: row.notifyOn, |
230 | 226 | projects: row.projects, |
|
239 | 235 | created() { |
240 | 236 | this.parseDestination(this.alert); |
241 | 237 | this.parseJiraTicketType(this.alert); |
242 | | - this.parseJiraProjectKey(this.alert); |
243 | 238 | }, |
244 | 239 | watch: { |
245 | 240 | enabled() { |
|
281 | 276 | return null; |
282 | 277 | } |
283 | 278 | }, |
284 | | - parseJiraProjectKey: function(alert) { |
285 | | - if (alert.publisherConfig) { |
286 | | - let value = JSON.parse(alert.publisherConfig); |
287 | | - if (value) { |
288 | | - return value.jiraProjectKey; |
289 | | - } |
290 | | - return null; |
291 | | - } |
292 | | - }, |
293 | 279 | updateNotificationRule: function () { |
294 | 280 | let url = `${this.$api.BASE_URL}/${this.$api.URL_NOTIFICATION_RULE}`; |
295 | 281 | this.axios.post(url, { |
|
298 | 284 | enabled: this.enabled, |
299 | 285 | notifyChildren: this.notifyChildren, |
300 | 286 | notificationLevel: this.notificationLevel, |
301 | | - publisherConfig: JSON.stringify({ destination: this.destination, jiraTicketType: this.jiraTicketType, jiraProjectKey: this.jiraProjectKey }), |
| 287 | + publisherConfig: JSON.stringify({ destination: this.destination, jiraTicketType: this.jiraTicketType }), |
302 | 288 | notifyOn: this.notifyOn |
303 | 289 | }).then((response) => { |
304 | 290 | this.alert = response.data; |
305 | 291 | this.destination = this.parseDestination(this.alert); |
306 | 292 | this.jiraTicketType = this.parseJiraTicketType(this.alert); |
307 | | - this.jiraProjectKey = this.parseJiraProjectKey(this.alert); |
308 | 293 | EventBus.$emit('admin:alerts:rowUpdate', index, this.alert); |
309 | 294 | this.$toastr.s(this.$t('message.updated')); |
310 | 295 | }).catch((error) => { |
|
0 commit comments