Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

integrations/trello: Use global time.

Niloth P0b64d722bbd5
diff --git a/zerver/webhooks/trello/tests.py b/zerver/webhooks/trello/tests.py
index db07c988724..8989b061b21 100644
--- a/zerver/webhooks/trello/tests.py
+++ b/zerver/webhooks/trello/tests.py
@@ -43,11 +43,11 @@ class TrelloHookTests(WebhookTestCase):
self.check_webhook("removing_member_from_card", "Welcome Board", expected_message)
def test_trello_webhook_when_due_date_was_set(self) -> None:
- expected_message = "TomaszKolek set due date for [Card name](https://trello.com/c/9BduUcVQ) to 2016-05-11 10:00:00 UTC."
+ expected_message = "TomaszKolek set due date for [Card name](https://trello.com/c/9BduUcVQ) to <time:2016-05-11 10:00:00 UTC>."
self.check_webhook("setting_due_date_to_card", "Welcome Board", expected_message)
def test_trello_webhook_when_due_date_was_changed(self) -> None:
- expected_message = "TomaszKolek changed due date for [Card name](https://trello.com/c/9BduUcVQ) from 2016-05-11 10:00:00 UTC to 2016-05-24 10:00:00 UTC."
+ expected_message = "TomaszKolek changed due date for [Card name](https://trello.com/c/9BduUcVQ) from <time:2016-05-11 10:00:00 UTC> to <time:2016-05-24 10:00:00 UTC>."
self.check_webhook("changing_due_date_on_card", "Welcome Board", expected_message)
def test_trello_webhook_when_due_date_was_removed(self) -> None:
diff --git a/zerver/webhooks/trello/view/card_actions.py b/zerver/webhooks/trello/view/card_actions.py
index e238da44036..82a7f1d7519 100644
--- a/zerver/webhooks/trello/view/card_actions.py
+++ b/zerver/webhooks/trello/view/card_actions.py
@@ -57,8 +57,8 @@ ACTIONS_TO_MESSAGE_MAPPER = {
REMOVE_DESC: "removed description from {card_url_template}.",
ARCHIVE: "archived {card_url_template}.",
REOPEN: "reopened {card_url_template}.",
- SET_DUE_DATE: "set due date for {card_url_template} to {due_date}.",
- CHANGE_DUE_DATE: "changed due date for {card_url_template} from {old_due_date} to {due_date}.",
+ SET_DUE_DATE: "set due date for {card_url_template} to <time:{due_date}>.",
+ CHANGE_DUE_DATE: "changed due date for {card_url_template} from <time:{old_due_date}> to <time:{due_date}>.",
REMOVE_DUE_DATE: "removed the due date from {card_url_template}.",
ADD_LABEL: 'added a {color} label with "{text}" to {card_url_template}.',
REMOVE_LABEL: 'removed a {color} label with "{text}" from {card_url_template}.',