Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jira integration doesn't escape ] in topic header #20642

Open
ElliotSilver opened this issue Dec 27, 2021 · 8 comments
Open

Jira integration doesn't escape ] in topic header #20642

ElliotSilver opened this issue Dec 27, 2021 · 8 comments

Comments

@ElliotSilver
Copy link

See https://chat.fhir.org/#narrow/stream/179297-committers.2Fnotification/topic/tracker-item/near/266079874.

Joe Smith created [FHIR-34638: Extra ]](https://jira.hl7.org/browse/FHIR-34638):
Priority: Highest
Assignee: no one

The title is supposed to be "Extra ]" ("extra" close bracket). It looks like the close bracket is messing up the link parsing. I assume the bracket needs to be escaped.

@timabbott
Copy link
Sponsor Member

Thanks for the report! I agree this is a bug. I'm not sure what the cleanest way to do this escaping is off the top of my head.

@zulipbot
Copy link
Member

zulipbot commented Jan 5, 2022

Hello @zulip/server-integrations members, this issue was labeled with the "area: integrations" label, so you may want to check it out!

@adambirds
Copy link
Member

@ElliotSilver can you advise a bit more on the issue, not quite sure whats going on. is it just the extra "[" thats the issue or are you missing one?

@adambirds
Copy link
Member

Also @ElliotSilver is there any chance you can get a test webhook event for this for us to test the fix with?

@ElliotSilver
Copy link
Author

ElliotSilver commented Jan 6, 2022

@adambirds The Jira ticket title was "Extra ]". The Jira integration takes the title, turns it into a link to the ticket, and makes it into the first line of the message, so a ticket with a title of Jira title becomes

SomeUser created [JIRA-1234: Jira title](http://jira.example.org/browse/JIRA-1234):

which renders as:

SomeUser created JIRA-1234: Jira title:

However, if the Jira title includes a close bracket, e.g., "Remove extra ]", then the integration turns the first line of the message into

SomeUser created [JIRA-1234: Remove extra ]](http://jira.example.org/browse/JIRA-1234):

which doesn't render correctly:

SomeUser created [JIRA-1234: Remove extra ]](http://jira.example.org/browse/JIRA-1234):

I suspect we need to escape the close bracket in order to get proper display:

SomeUser created [JIRA-1234: Remove extra \]](http://jira.example.org/browse/JIRA-1234):
SomeUser created JIRA-1234: Remove extra ]:

I don't know if there are other characters that might break the link rendering.

As for getting a test webhook, I'm just an end user. If it's something I can collect, let me know how and I can try. Perhaps @jmandel has access to that side of things.

@adambirds
Copy link
Member

I understand a bit better now. Shouldn't need a test webhook. Thanks @ElliotSilver

@adambirds
Copy link
Member

@zulipbot claim

@zulipbot
Copy link
Member

zulipbot commented Jan 16, 2022

Hello @adambirds, you have been unassigned from this issue because you have not updated this issue or any referenced pull requests for over 14 days.

You can reclaim this issue or claim any other issue by commenting @zulipbot claim on that issue.

Thanks for your contributions, and hope to see you again soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants