How to find issues that at some point has been assigned to you?

Viewed 80055

We use Jira extensively in our project, but I often have a hard time finding issues, that I know, I have been working on earlier. Usually, if some case is reported, that seems familiar to something I have been working on in the past, but I don't remember exactly what and when.

Usually, an issue is reported, then our scrum master assigns it to the developer, the developer fixes it (hopefully) and then passes it to the tester (yay, it works!). But then it is no longer assigned to me, and I have a hard finding old issues, that I remember vaguely.

I thought, perhaps it is possible to see the assigned history of an issue, there might be a way to form an advanced search/filter, that finds all issues, that at some time has been assigned to me.

Has anyone done this?

12 Answers

General-purpose query for whichever 'current user':

assignee was currentUser()

This filter can be conveniently shared & anybody can put it on their dashboard, etc and it will return results specific to them.. Not supported on all old JIRA versions though.

This was my most-requested JIRA feature ever.

You can find issues by worklog entries directly in the database:

select distinct ji.pkey from jiraissue ji inner join worklog wl on ji.id=wl.issueid where wl.author='some_username';

I agree this should be implemented in the UI though.

I think the most sensible approach is to search the issue-history. The only thing, that is not logged there, is who accessed the issue (just watching, without changing anything).

But you can't search the ticket-history without database access (as far as I know, please correct me if I'm wrong)

So, to search all issues with "someUserName" in the issuehistory, you have to inner join the table changegroup (and maybe the table changeitem from there).

Example:

select ji.id,issuenum,summary,creator,assignee,ji.created,updated,c.id as histid,c.author from jiraissue ji inner join changegroup c on ji.id=c.issueid where c.author like 'someUserName';

c.id as histid ==> this is the number/id of the entry in the (issue-)"History" tab

Meaning: if there ever was a change by the user "someUserName" it is logged in the History and it will be listet with this query

The following example will just list every disting issue, where the "myusername" was found in the History after the date 20180501:

select distinct ji.id,issuenum,summary,creator,assignee,ji.created,updated,c.author from jiraissue ji inner join changegroup c on ji.id=c.issueid where c.author like 'myusername' and ji.created > '2018-05-01T00:00:00.000';

I annotated the necessary relation here: enter image description here

From menu select Tempo->Reports

Select date-range

and you should see report.

I tried the below SQL query and it gives data of all the issues and all the assignees that were ever assigned to an issue. Any change in the assignee for any issue is captured by below query:

select distinct
p.pkey +'-'+cast(ji.issuenum as varchar(max)),
ji.SUMMARY,
cast(ci.OLDSTRING as nvarchar(max)) as 'Old value',
cast(ci.NEWSTRING as nvarchar(max)) as 'New value'
from
jiraissue ji
join project p on p.id = ji.PROJECT
join changegroup cg on cg.issueid = ji.id
join changeitem ci on ci.groupid = cg.id and FIELD = 'assignee'

Anyone looking for the query would find this useful : )

-Neha 'D' Pal

Related