How do I stop URL encoding in JIRA comments/descriptions

There are several JIRA tickets that we have where a person is being instructed to update database fields, where the value of the field is a URL. However, as soon as JIRA sees http, it interprets the rest of the line, until it reaches a whitespace character, as part of the URL - turning it into a link and URL encoding it. This is a problem because, being the literal value of a database field update, it is terminated with a single quote, which in turn is being (wrongly) encoded as '.

Example: update field1 set value='http://some.url.com/some/path/to/file.html'

EDIT: the above example looks fine here, but if I do the same thing in a JIRA comment or ticket description, it will come out looking like update field1 set value='http://some.url.com/some/path/to/file.html'.

3 answers

1 accepted

This widget could not be displayed.

Ok, so, I actually did end up answering my own question here. The issue I had was that my system was NOT set up to use the wiki style renderer for description or comment fields, but the default text renderer. Justin was on the right track, but just didn't go far enough in his explanation of field renderers. Once I changed the renderer, I can now enclose my SQL statements in {noformat} or {code} tags and I'm happy.

This widget could not be displayed.

Or how about using the {noformat} macro to wrap your SQL command:

{noformat}
update field1 set value='http://some.url.com/some/path/to/file.html'
{noformat}

The {noformat} is a Wiki-text renderer setup that can be used for Free Text fields, comments and Descriptions.

This widget could not be displayed.

Dear Neil,

Probably you can try to use the URL macro to limit the URL, for an example:
update field 1 set value = [http://some.url.com/some/path/to/file.html]

I hope that this will help!

Nope, that does not work. Keep in mind this is JIRA, not confluence. This is from a sample ticket in my JIRA system:

If I just put in the update statement as written:

UPDATE `sbdb`.`sb_preferences` SET P_VALUE='https://mservices.meijer.com/OptInOutServiceExt/PreferenceManagementService.svc' WHERE P_LABEL='apiUrl' AND P_NODE='//COM/soundbite/ApiWorkerModule/MEIJER_PREFMGMT';

If I try to enclose the URL portion in square brackets:

UPDATE `sbdb`.`sb_preferences` SET P_VALUE='[https://mservices.meijer.com/OptInOutServiceExt/PreferenceManagementService.svc]' WHERE P_LABEL='apiUrl' AND P_NODE='//COM/soundbite/ApiWorkerModule/MEIJER_PREFMGMT';

Note that while I no longer get the single quote being URL encoded to ', I now have square brackets in my quoted string, which is also incorrect. So I'm still looking for a solution.

Note that I still haven't received an answer to this question. Commenting here for additional attention. I have also opened a support ticket.

Dear Neil,

I am sorry to know that the problem still remains on your end.

Looking at your responses above, I see that you tried to update the field value with the URL directly from the database level. However, I see that the table that you want to update is sb_preferences, which I am afraid is not the default JIRA table.

And also, may I know which field in JIRA that is used to contain the URL?

Note that for JIRA fields (or custom fields) that is using the Wiki Style renderer, supposedly we should be able to use bracket on and off to limit the URL entered in the field. Reference: https://jira.atlassian.com/secure/WikiRendererHelpAction.jspa?section=links

Thanks,
Ahmad

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in Teamwork

What teamwork quotes inspire you?

Hey everyone! My name is Natalie and I'm an editor of the Atlassian Blog and I've got a question for you: What's your favorite quote about teamwork?  We've compiled a list here, along with...

142 views 16 7
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you