Karl,

The patch was successful, I now see “allow_token_document” fields being passed to SOLR.
Regards
Damien Collis
Team Leader – Systems Integration
Link Group

•   Level 4, 1A Homebush Bay Drive, Rhodes NSW 2138
• Email: [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>
• Ph: +61 2 8571 5616

From: Karl Wright [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 6 February 2018 1:16 AM
To: [EMAIL PROTECTED]
Subject: Re: How to extract JIRA authorities

Patch attached, and fix committed to trunk.  Please let me know if it works for you.  Thanks!!

Karl
On Mon, Feb 5, 2018 at 9:11 AM, Karl Wright <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>> wrote:
I created CONNECTORS-1493 and will attach a patch shortly.

Karl
On Mon, Feb 5, 2018 at 9:09 AM, Karl Wright <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>> wrote:
What this is supposed to be doing is grabbing all the users that are associated with the given issue.

Clearly then the first query is bogus and that's why it's not working.

It sounds like all that is needed is to add two single quotes to the query.  I'm happy to add this to the code, if you'd like to create a ticket, and then you can see if it fixes the problem.

Karl
On Sun, Feb 4, 2018 at 9:15 PM, Damien Collis <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>> wrote:
Karl,

The jira documentation states:  Username - the username filter, no users returned if left blank
So, I have run a couple of tests against my JIRA server, and it looks like single quotes are required in the request, e.g. username=’’ (username=%27%27)

Here are the results of my tests...
Request 1 (Returns nothing)
http://jira/rest/api/latest/user/viewissue/search?username=&issueKey=REQ-9999&maxResults=1000&startAt=0<https://urldefense.proofpoint.com/v2/url?u=http-3A__jira_rest_api_latest_user_viewissue_search-3Fusername-3D-26issueKey-3DREQ-2D9999-26maxResults-3D1000-26startAt-3D0&d=DwMFaQ&c=EyrAshB9xIzcegaT9SDe6g&r=Gn5yxeb6W9ERepUyEmssft7I4Tobgyxsu0tR69ePkS8&m=gNuOkz5uz22-KjhqZuBbMEo56ecKpKk2fAQi2o2Wc_4&s=1M3h_krHqwB4VDVO3f7FMOJ6BgGY2pTQxomZhP-ut74&e=>
Response 1
[]

Request 2 (Returns only the username matching the request)
http://jira/rest/api/latest/user/viewissue/search?username=FredFlintstone&issueKey=REQ-9999&maxResults=1000&startAt=0<https://urldefense.proofpoint.com/v2/url?u=http-3A__jira_rest_api_latest_user_viewissue_search-3Fusername-3DFredFlintstone-26issueKey-3DREQ-2D9999-26maxResults-3D1000-26startAt-3D0&d=DwMFaQ&c=EyrAshB9xIzcegaT9SDe6g&r=Gn5yxeb6W9ERepUyEmssft7I4Tobgyxsu0tR69ePkS8&m=gNuOkz5uz22-KjhqZuBbMEo56ecKpKk2fAQi2o2Wc_4&s=WJxRFsOpMWHXGHvE-3wd7nWmt6Q7U_pwC2Svkr9w6To&e=>
Response 2
[{"self":"http://jira.apac.linkgroup.corp/rest/api/2/user?username=FredFlintstone<https://urldefense.proofpoint.com/v2/url?u=http-3A__jira.apac.linkgroup.corp_rest_api_2_user-3Fusername-3DFredFlintstone&d=DwMFaQ&c=EyrAshB9xIzcegaT9SDe6g&r=Gn5yxeb6W9ERepUyEmssft7I4Tobgyxsu0tR69ePkS8&m=gNuOkz5uz22-KjhqZuBbMEo56ecKpKk2fAQi2o2Wc_4&s=xDHVwusBmrHGyBx4jMFFPpa_Yb02bAtFaEbHB8p6JqE&e=>","key":"FredFlintstone","name":"FredFlintstone","emailAddress":"[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>","avatarUrls":{"48x48":"http://jira.apac.linkgroup.corp/secure/useravatar?ownerId=FredFlintstone&avatarId=14201<https://urldefense.proofpoint.com/v2/url?u=http-3A__jira.apac.linkgroup.corp_secure_useravatar-3FownerId-3DFredFlintstone-26avatarId-3D14201&d=DwMFaQ&c=EyrAshB9xIzcegaT9SDe6g&r=Gn5yxeb6W9ERepUyEmssft7I4Tobgyxsu0tR69ePkS8&m=gNuOkz5uz22-KjhqZuBbMEo56ecKpKk2fAQi2o2Wc_4&s=AZ7uOnoaPAF1SmA7w0mxOH5tbxpD_1tmzkprKqHiDeY&e=>","24x24":"http://jira.apac.linkgroup.corp/secure/useravatar?size=small&ownerId=FredFlintstone&avatarId=14201<https://urldefense.proofpoint.com/v2/url?u=http-3A__jira.apac.linkgroup.corp_secure_useravatar-3Fsize-3Dsmall-26ownerId-3DFredFlintstone-26avatarId-3D14201&d=DwMFaQ&c=EyrAshB9xIzcegaT9SDe6g&r=Gn5yxeb6W9ERepUyEmssft7I4Tobgyxsu0tR69ePkS8&m=gNuOkz5uz22-KjhqZuBbMEo56ecKpKk2fAQi2o2Wc_4&s=adlap5_mIE4nr-eSgEEHkBDGHbtw2HzaIbUIO768hvE&e=>","16x16":"http://jira.apac.linkgroup.corp/secure/useravatar?size=xsmall&ownerId=FredFlintstone&avatarId=14201<https://urldefense.proofpoint.com/v2/url?u=http-3A__jira.apac.linkgroup.corp_secure_useravatar-3Fsize-3Dxsmall-26ownerId-3DFredFlintstone-26avatarId-3D14201&d=DwMFaQ&c=EyrAshB9xIzcegaT9SDe6g&r=Gn5yxeb6W9ERepUyEmssft7I4Tobgyxsu0tR69ePkS8&m=gNuOkz5uz22-KjhqZuBbMEo56ecKpKk2fAQi2o2Wc_4&s=5jMPl-1hqA0pajqLbOk-9bWQjpWbyzG4C-LhbHcgKNU&e=>","32x32":"http://jira.apac.linkgroup.corp/secure/useravatar?size=medium&ownerId=FredFlintstone&avatarId=14201<https://urldefense.proofpoint.com/v2/url?u=http-3A__jira.apac.linkgroup.corp_secure_useravatar-3Fsize-3Dmedium-26ownerId-3DFredFlintstone-26avatarId-3D14201&d=DwMFaQ&c=EyrAshB9xIzcegaT9SDe6g&r=Gn5yxeb6W9ERepUyEmssft7I4Tobgyxsu0tR69ePkS8&m=gNuOkz5uz22-KjhqZuBbMEo56ecKpKk2fAQi2o2Wc_4&s=HT2atQByknjJnVeVMGCyxKhDPCOjTDpXYRkXUXnKHzA&e=>"},"displayName":"Fred Flintstone","active":true,"timeZone":"Australia/Sydney","locale":"en_AU"}]

Request 3 (Returns all usernames)
http://jira/rest/api/latest/user/viewissue/search?username=%27%27&issueKey=REQ-1174&maxResults=1000&startAt=0<https://urldefense.proofpoint.com/v2/url?u=http-3A__jira_rest_api_latest_user_viewissue_search-3Fusername-3D-2527-2527-26issueKey-3DREQ-2D1174-26maxResults-3D1000-26startAt-3D0&d=DwMFaQ&c=EyrAshB9xIzcegaT9SDe6g&r=Gn5yxeb6W9ERepUyEmssft7I4Tobgyxsu0tR69ePkS8&m=gNuOkz5uz22-KjhqZuBbMEo56ecKpKk2fAQi2o2Wc_4&s=6F2YP5YlrKp75j9q-jQ9ymjDYeFp4mh4cTRRXraGck0&e=>
Response 3
[{"self":"http://jira.apac.linkgroup.corp/rest/api/2/user?username=FredFlintstone<https://urldefense.proofpoint.com/v2/url?u=http-3A__jira.apac.linkgroup.corp_rest_api_2_user-3Fusername-3DFredFlintstone&d=DwMFaQ&c=EyrAshB9xIzcegaT9SDe6g&r=Gn5yxeb6W9ERepUyEmssft7I4Tobgyxsu0tR69ePkS8&m=gNuOkz5uz22-KjhqZuBbMEo56ecKpKk2fAQi2o2Wc_4&s=xDHVwusBmrHGyBx4jMFFPpa_Yb02bAtFaEbHB8p6JqE&e=>","key":"FredFlintstone","name":"FredFlintstone","emailAddress":"[EMAIL PROTECTED]<mail