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=''

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=''.

3 answers

1 accepted

0 votes
Accepted answer

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.

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

update field1 set value=''

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

Dear Neil,

Probably you can try to use the URL macro to limit the URL, for an example:
update field 1 set value = []

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='' 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='[]' 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:


Suggest an answer

Log in or Sign up to answer
Community showcase
Published yesterday in Agile

How Scrum works? It starts with training and education

To answer “How scrum works,” most of the teams I've worked with first addressed the question: “where to start?”  That question applies to both implementation and improvements on the Scrum framew...

115 views 3 3
Read article

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