Hi all,
I've to get data from issues transferred among projects during an interval of time.
What's the better method to do this in my Java plugin?
Keeping in mind performance, I think that executing SQL query directly is not a good idea (tables changegroup and changeitem).
This query returns exactly that I need.
SELECT project.pkey
,jiraissue.issuenum
,jiraissue.SUMMARY
,changegroup.CREATED
,changeitem.OLDSTRING
,changeitem.NEWSTRING
,cwd_user.display_name
FROM changegroup
INNER JOIN changeitem
ON changeitem.groupid = changegroup.ID
INNER JOIN jiraissue
ON jiraissue.ID = changegroup.issueid
INNER JOIN project
ON project.ID = jiraissue.project
INNER JOIN cwd_user
ON cwd_user.user_name = changegroup.AUTHOR
WHERE changeitem.FIELD = 'project'
AND changegroup.CREATED BETWEEN ' startDateTime ' AND ' finishDateTime ';
Somebody knows the correct way to do this?
Any sample piece of code will be appreciated.
Thanks in advance.
Mário dos Santos [TOTVS]