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'.
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.
Stop parsing my URLs!!
When I type https://www.xxxx.com/ I expect to see exactly that; we are often developing platforms so seeing the exact URL "as is" is extremely important.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Note that I still haven't received an answer to this question. Commenting here for additional attention. I have also opened a support ticket.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.