<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Add-on for JIRA: Is there a character limit in jirarest jqlsearch? in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Add-on-for-JIRA-Is-there-a-character-limit-in-jirarest-jqlsearch/m-p/285764#M33985</link>
    <description>&lt;P&gt;So I realized that I needed to escape the inner quotes as follows.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| jirarest jqlsearch "text ~ \"20160721163457215194133559\""
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This returns the appropriate results, however, it is still unclear to me why the 19 character version without escaping the quotes worked.&lt;/P&gt;</description>
    <pubDate>Thu, 28 Jul 2016 12:57:09 GMT</pubDate>
    <dc:creator>leonphelps_s</dc:creator>
    <dc:date>2016-07-28T12:57:09Z</dc:date>
    <item>
      <title>Add-on for JIRA: Is there a character limit in jirarest jqlsearch?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Add-on-for-JIRA-Is-there-a-character-limit-in-jirarest-jqlsearch/m-p/285763#M33984</link>
      <description>&lt;P&gt;This is the search I am trying to execute from within Splunk:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| jirarest jqlsearch "text ~ "20160721163457215194133559""
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I just want to find that # in JIRA.. &lt;/P&gt;

&lt;P&gt;The result from that command is HTTP Error 400: Bad Request (Jira Exception)&lt;/P&gt;

&lt;P&gt;If I shorten that request to (19 characters, no more)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| jirarest jqlsearch "text ~ "2016072116345721519""
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It returns "No results" presumably because there aren't any. For the sake of testing.. I added the 19 character # to a jira case and re-ran the query.&lt;/P&gt;

&lt;P&gt;It returned the appropriate single row.. the full details of the jira case with both the original and long version of the #. &lt;/P&gt;

&lt;P&gt;Ideas?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2016 01:22:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Add-on-for-JIRA-Is-there-a-character-limit-in-jirarest-jqlsearch/m-p/285763#M33984</guid>
      <dc:creator>leonphelps_s</dc:creator>
      <dc:date>2016-07-28T01:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: Add-on for JIRA: Is there a character limit in jirarest jqlsearch?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Add-on-for-JIRA-Is-there-a-character-limit-in-jirarest-jqlsearch/m-p/285764#M33985</link>
      <description>&lt;P&gt;So I realized that I needed to escape the inner quotes as follows.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| jirarest jqlsearch "text ~ \"20160721163457215194133559\""
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This returns the appropriate results, however, it is still unclear to me why the 19 character version without escaping the quotes worked.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2016 12:57:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Add-on-for-JIRA-Is-there-a-character-limit-in-jirarest-jqlsearch/m-p/285764#M33985</guid>
      <dc:creator>leonphelps_s</dc:creator>
      <dc:date>2016-07-28T12:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: Add-on for JIRA: Is there a character limit in jirarest jqlsearch?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Add-on-for-JIRA-Is-there-a-character-limit-in-jirarest-jqlsearch/m-p/285765#M33986</link>
      <description>&lt;P&gt;Looks like you found the issue here pretty quickly.  You should escape quotes within the query if your JQL search requires them.&lt;/P&gt;

&lt;P&gt;Note that if your text ~ statement is only one word (not a number!, see below comment) with no spaces, you shouldn't need quotes there at all.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| jirarest jqlsearch "text ~ SOMELONGSTRING"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Should work the same. If you have spaces in the criteria, then yes, you will need the escaped quotes.&lt;/P&gt;

&lt;P&gt;**Edited for clarity&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2016 17:09:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Add-on-for-JIRA-Is-there-a-character-limit-in-jirarest-jqlsearch/m-p/285765#M33986</guid>
      <dc:creator>Flynt</dc:creator>
      <dc:date>2016-07-28T17:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: Add-on for JIRA: Is there a character limit in jirarest jqlsearch?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Add-on-for-JIRA-Is-there-a-character-limit-in-jirarest-jqlsearch/m-p/285766#M33987</link>
      <description>&lt;P&gt;I suspect this has something to do with the number converting to scientific notation when it is larger. If you are using alphanumeric characters it works fine.&lt;/P&gt;

&lt;P&gt;When the number is converted to scientific notation it will contain a "+" which will confuse the API query syntax.&lt;/P&gt;

&lt;P&gt;Note that for this search &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|jirarest jqlsearch "project=foo key=bar"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;gets translated as&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;project%3Dfoo+key%3Dbar
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So with the number being in scientific notation it would cause the API to see that extra "+" which would invalidate the request.&lt;/P&gt;

&lt;P&gt;In this case the underlying python script sees the query&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | jirarest jqlsearch "text ~ "20160721163457215194133559""
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;as &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;text+%7E+20160721163457215194133559
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;which gets decoded to&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; text ~ 20160721163457215194133559
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and is most likely presented to the API as &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;text+%7E+2.0160721163457216e+25
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 Jul 2016 17:24:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Add-on-for-JIRA-Is-there-a-character-limit-in-jirarest-jqlsearch/m-p/285766#M33987</guid>
      <dc:creator>Flynt</dc:creator>
      <dc:date>2016-07-28T17:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: Add-on for JIRA: Is there a character limit in jirarest jqlsearch?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Add-on-for-JIRA-Is-there-a-character-limit-in-jirarest-jqlsearch/m-p/285767#M33988</link>
      <description>&lt;P&gt;attempting it without the quotes does not work, presumably because of the additional information you just added. The quotes forces the issue I suppose and looks for the exact string.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2016 17:28:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Add-on-for-JIRA-Is-there-a-character-limit-in-jirarest-jqlsearch/m-p/285767#M33988</guid>
      <dc:creator>leonphelps_s</dc:creator>
      <dc:date>2016-07-28T17:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: Add-on for JIRA: Is there a character limit in jirarest jqlsearch?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Add-on-for-JIRA-Is-there-a-character-limit-in-jirarest-jqlsearch/m-p/285768#M33989</link>
      <description>&lt;P&gt;Yes you are correct, without the quotes it will convert it just the same. My example is poor when using a number and not a string. I've edited the answer accordingly&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2016 17:34:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Add-on-for-JIRA-Is-there-a-character-limit-in-jirarest-jqlsearch/m-p/285768#M33989</guid>
      <dc:creator>Flynt</dc:creator>
      <dc:date>2016-07-28T17:34:11Z</dc:date>
    </item>
  </channel>
</rss>

