The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

database custom field : The statement did not return a result set

Omprakash Thamsetty
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
October 25, 2016

Hi,

 

We have upgraded JIRA from 6.4.12 to 7.2.2 recently and found issue with database custom field which was running fine in old version. After upgrade changed the odbc jar file for ms sql as per the below instructions

 

https://confluence.kepler-rominfo.com/display/DBCF/Database+custom+fields+don't+work+on+JIRA+7

I used sqljdbc42.jar file to connect to the databases as per above instructions.

 

Issue with only one field where I use sql query as below

 

DECLARE @DropList table (Provider  varchar(1000))
DECLARE @Values VARCHAR(1000)
SET @Values = (SELECT  cfv.textvalue
from jiraschemaP.customfield cf
join jiraschemaP.customfieldvalue cfv on cf.id = cfv.customfield
join jiraschemaP.jiraissue issue on issue.id = cfv.issue
Where issue.issuetype = '10000'
and cf.id = 10807
and issue.summary = {customfield_11201})
PRINT @Values
DECLARE @LastVal VARCHAR(1000)
SET @LastVal = CHARINDEX('###',REVERSE(@Values))-1

IF CHARINDEX('###',@Values) > 0
BEGIN
    WHILE LEN(@Values) > @LastVal
        BEGIN
            INSERT INTO @DropList Select SUBSTRING(@Values,0,CHARINDEX('###',@Values))
            SET @Values = SUBSTRING(@Values,LEN(SUBSTRING(@Values,0,CHARINDEX('###',@Values)+2))+2,LEN(@Values)-(LEN(SUBSTRING(@Values,0,CHARINDEX('###',@Values)+2))+1))       
    END
    INSERT INTO @DropList SELECT @Values
END
ELSE
    BEGIN
        INSERT INTO @DropList SELECT @Values
END

SELECT * FROM @DropList ORDER BY Provider ASC;

 

It is saying "The statement did not return a result set". Seems to me problem with @DropList values. Does any one have any idea?

 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Omprakash Thamsetty
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
October 26, 2016

We created the stored processor and exec in databases custom field console. Its working after calling the store processor but not from console. Hope something problem with plugin or sqljdbc42.jar which is not allowing some functions that we used for DropList itseems.