|
@@ -6,6 +6,7 @@ from celery.task import current
|
|
|
from django.core.urlresolvers import reverse
|
|
|
from requests.exceptions import RequestException
|
|
|
|
|
|
+from sentry import features
|
|
|
from sentry.http import safe_urlopen
|
|
|
from sentry.tasks.base import instrumented_task, retry
|
|
|
from sentry.utils.http import absolute_uri
|
|
@@ -69,12 +70,20 @@ def send_alert_event(event, rule, sentry_app_id):
|
|
|
project.slug,
|
|
|
event.id,
|
|
|
]))
|
|
|
- event_context['web_url'] = absolute_uri(reverse('sentry-group-event', args=[
|
|
|
- project.organization.slug,
|
|
|
- project.slug,
|
|
|
- group.id,
|
|
|
- event.id,
|
|
|
- ]))
|
|
|
+
|
|
|
+ if features.has('organizations:sentry10', project.organization):
|
|
|
+ event_context['web_url'] = absolute_uri(reverse('sentry-organization-event-detail', args=[
|
|
|
+ project.organization.slug,
|
|
|
+ group.id,
|
|
|
+ event.id,
|
|
|
+ ]))
|
|
|
+ else:
|
|
|
+ event_context['web_url'] = absolute_uri(reverse('sentry-group-event', args=[
|
|
|
+ project.organization.slug,
|
|
|
+ project.slug,
|
|
|
+ group.id,
|
|
|
+ event.id,
|
|
|
+ ]))
|
|
|
|
|
|
# The URL has a regex OR in it ("|") which means `reverse` cannot generate
|
|
|
# a valid URL (it can't know which option to pick). We have to manually
|