I'm trying to write a SQL script that will find all the actions a particular member of our staff has done.
When I do a join on ID it mixes results from different tickets.
Is Id not unique per ticket>
select
jiraaction.author,
jiraaction.actiontype,
jiraaction.actionbody,
jiraissue.id,
jiraaction.id,
jiraissue.reporter,
jiraissue.assignee,
jiraissue.creator,
jiraissue.summary,
jiraissue.description,
jiraissue.created,
jiraaction.created,
jiraaction.updateauthor,
jiraaction.updated
from jiraissue
join jiraaction
on
jiraaction.id = jiraissue.id
SQL is the worst possible way to report on jira data.
But if you insist, then it is important to understand that most Jira tables have an id that uniquely identifies a record in them (you don't need that in a proper database, but that's one of many reasons reporting this way is bad. The Jira database is NOT a database, it's a data store).
For your query, you need to join on jiraaction.issueid = jiraissue.id
Thanks, I'm not wedded to SQL, I just couldn't see any other way to see all the comments made across the system by an individual user.
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.