I had nice query to pull the change data for a custom field for last 24 hours post update from 5.11 to 6.3 the query is broken since the 'pkey' field is not longer used.
SELECT
changegroup.created as "Updated",
jiraissue.pkey,
cwd_user.display_name as "Changed by",
changeitem.oldstring as "Old Version",
changeitem.newstring as "New Version"
FROM changeitem
INNER JOIN changegroup ON changegroup.ID = changeitem.groupid
INNER JOIN jiraissue ON changegroup.issueid = jiraissue.id
INNER JOIN cwd_user on changegroup.author = cwd_user.user_name
WHERE
"public".changeitem.field = 'Target Version' AND
"public".changegroup.created >= now() - INTERVAL '1 DAY'
ORDER BY
"public".jiraissue.created DESC
Replace "issue.pkey" by "project.pkey + '-' + CAST(jiraissue.issuenum AS varchar(9))"
and add join "inner join project on jiraissue.project = project.id"
This is SQL Server SQL code, you can easily adapt for other databases...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.