List of all jira tasks that I was assigner on - jira

How can I get list of all tasks that I was assigned?
I just need to know all the tasks despite its current status or assignee.
Is it possible?

So here the answer to the changed question (tasks that I was assigned to):
Depending on the version of JIRA, you are now able to asked questions that go into history. See the example in the documentation and the documentation about the "WAS operator".
Your query should look like:
assignee WAS "wormhit" BEFORE "02/02/2011"
If you want to store your search (not the result), there are the following options:
Define your own filter by saving a search like the one as "Own issues". Steps:
Search > Edit > Issue Attributes > Assignee > Current User
Switch on the top to tab Summary
Under Operations, press Save it as filter
Give it meaningful name.
The filter is now available under Issues > Favorite Filters
You may store the shortcut for the search as a bookmark

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.. Requires a not-too-old JIRA version, though.
This was my most-requested JIRA feature ever.

Yes. You can add a gadget "my tasks" to your dashboard.
Or you can use JQL like:
assignee = %yourname%
UPD To find tasks you WAS assigned, use JQL: "assignee was %username%"

By following this discussin I stumbled on HP/Palm Jira Search Plugin that can find what I'm looking for.

Go like this:
Issues -> search for issues -> Issue atrributes -> Assignee -> Current User -> Search

Related

Jira JQL operator and + and + and

please I want to create a filter of custom statuses, but somehow when I press search I will get no results. When I search only for one status all is fine, but I want to merge that somehow into one filter. Or is there any way to get a exact number of tasks in any kind of status, assigned to the user? Im using the pie chart and want to see the number of all tasks assigned for any guy in the team, no matter the status. And I want to have it in a gadget. Thanks
Code Im using is:
project = "XYZ" AND status = "To Do" AND status = "Awaiting Approval"
AND status = "In Progress"
Have you looked at the 'in' operator?
...AND status IN ('To Do','Awaiting Approval','In Progress')
A Jira ticket cannot have more than one status at the time. I would do something like this
project = "XYZ" AND status IN ("To Do", "Awaiting Approval", "In Progress")
The other answers are definitely the correct way to write the JQL you were aiming to write, however I believe there is a better solution to your actual aim.
From what I understand, you want to see any Jira issue which is not closed and is assigned to a particular user. In this case I think the best solution would not to find all issues in the specific "open" statuses, but instead to find all which are not closed.
The best way to do this is by filtering by the status-category, as this will ensure the JQL works for all workflows, regardless of what their done/closed statuses are called.
statuscategory != done AND assignee=<user>
Replace <user> with the user you want to filter for, or currentUser() to automatically get the user who is running the query.
Documentation (only mentioned briefly): https://support.atlassian.com/jira-software-cloud/docs/advanced-search-reference-jql-fields/#Advancedsearchingfieldsreference-ResolutionResolution

How can I view all the JIRA tickets I'm watching?

I clicked watcher for many JIRA tickets, but I can't find a filter that shows me all the tickets I am watching. Can someone direct me to the right link or filter to look.
Type in the Jira issues search (Issues > Search for issues): key in watchedIssues()
or go directly to the URL, like to your JIRA domain http://<your-jira-domain>/jira/issues/?jql=key%20in%20watchedIssues()
There is also a gadget you can add to your JIRA homepage (dashboard): Watched Issues
From the top right button "add gadget", then on the pop-pup search for "watched" and you will get it.
If you open up a "New search". Then the filter below will show you, your watched tasks:
watcher = currentUser() AND resolution = Unresolved ORDER BY priority DESC, updated DESC
Hope it suits you :-)

how to create JIRA quick filter where assignee is Unassigned

I defined a unassigned user in my JIRA account and now I can assign to unassigned user. when I want to get all those tickets using quick filter - I can't.
any solution / workaround will be most welcome.
In your case, create filter and type in JQL:
assignee = unassigned user
Or if no assignee
assignee is empty
You can select the widget "filter result" to show the consequence on your dashboard.
In my humble opinion create a specific user to assign those task which you want to consider as unassigned is pointless and it would require additional effort when Jira already gives you that feature natively.
You only need to use JQL filters to query. For instance, if using 'python-jira' module you can easily do the following:
# Get all issues which are unassigned and belongs to project 'DESK'
issues = jira.search_issues('assignee=null and project=DESK')
print issues
This will output all unassigned issues (of course it will vary from your JIRA DB):
[<JIRA Issue: key=u'DESK-9', id=u'10009'>, <JIRA Issue: key=u'DESK-7', id=u'10007'>, <JIRA Issue: key=u'DESK-5', id=u'10004'>]

Jira Quick-filter to show all task with subtasks assigned to current user

Currently, I have a quick filter to show me my task that does this:
assignee = currentUser()
This works ok, but doesn't show me tasks that are assigned to someone else, but have subtasks assigned to me. Is it possible to make it show me both tasks assigned to me, and tasks that have subtasks assigned to me?
Create a filter for all of your subtask from the following JQL:
issuetype in subtaskIssueTypes() and assignee = currentUser()
Then, using Craftforge JQL Functions Plugin, use the following JQL to find their parents:
issue in parentIssuesFromFilter("filter name or its id")
The following query will return all parent tasks, which have sub-tasks assigned to the current user. (The parent task need not be assigned to current user)
issueFunction in parentsOf("assignee = currentUser() ")
Note: issueFunction requires the ScriptRunner plugin and it's not free.
In addition to #Kuf's answer, it's sometimes much simpler to write the whole thing in one query especially with Swimlanes or Quick-Filters in Greenhopper, rather than creating and saving custom filter.
For instance, to show Un-finished Issues or Sub-tasks in one quick-filter on Greenhopper:
status!=Closed or issue in parentIssuesFromQuery("issuetype in subtaskIssueTypes() AND status!=Closed ")
Navigate to Issues (in header) > Search for issues, then enter your search criteria.

Issues commented by me in JIRA

As per JIRA documentation
http://www.atlassian.com/software/jira/docs/latest
The following filter will show the issues opned by me (Current User).
reporter = currentUser()
Is there a filer that will show issues commented by me? something like the following does not work...
comment by = currentUser()
if you know the name of the user (lets assume the name is Tom you can do:
issueFunction in commented("by Tom")
you can also filter it by date of the comment like:
issueFunction in commented("after -1d by Tom")
UPDATE: this requires ScriptRunner being installed in JIRA server (as JBert pointed out)
You can use the Activity Stream gadget with a filter configured by username and activity type. Note that this requires a case-sensitive username, not the friendly Display Name.
Activity Stream gadget configuration:
Filtered Activity Stream display:
(I posted a variation of this answer elsewhere but have improved my filter since then and the new filter is more salient to this question anyhow.)
You could also follow the approach presented by Matt Doar:
Use a participants field from the JIRA Toolkit plugin and query that
http://confluence.atlassian.com/display/JIRA/Advanced+Searching?focusedCommentId=229838922#comment-229838922
It's not a a complete answer but maybe a step in the right direction...
Francis
I had the same problem and
issueFunction in commented("by username")
worked for me
The following query identifies tickets in which current (or some other particular) user was mentioned in comments:
comment ~ currentUser()
The new scriptrunner can do lots of things e.g. find issues with comments issueFunction in hasComments(), find issues with comments that are not older than 7 days issueFunction in commented("after -7d") and also issue comments from users or groups.
Details can be found here:
https://jamieechlin.atlassian.net/wiki/display/GRV/Scripted+JQL+Functions#ScriptedJQLFunctions-commented(commentquery)
You can try that workaround I am current using this expression on my saved search:
comment ~ "your.username.here"
This in fact catch the comments where I was mentioned, but if you mention yourself probably should works. I have not tried by myself.
My current Jira is a cloud based one, so I can't tell you exactly which version is.
In JIRA v7.3.0, the watcher field works well, if autowatch is enabled:
watcher = currentUser()
How to enable
Profile > Preferences > Autowatch : [inhert, disabled, enabled]
Issues that you create or comment on will automatically be watched for future changes.
For filtering issues in which you have been mentioned, try comment ~ currentUser()
This (to my knowledge) cannot be completed using JQL, even with a plugin. If you have DB access, the query is simple:
SELECT pkey, summary FROM jiraissue, jiraaction WHERE jiraissue.id = jiraaction.issueid AND author = '<insert_jira_username>';
If you're talking only about the current user, there is a personal Activity Stream in your profile
https://xxx.atlassian.net/secure/ViewProfile.jspa
It includes actions other than comments, but does provide an RSS feed which you could filter only comments with:
<category term="comment"/>
This is the query to know the issues I am involved in:
SELECT a.pkey, a.summary FROM jiraissue AS a left join jiraaction AS b on a.id = b.issueid
where b.author = 'jira_username' OR a.REPORTER = 'jira_username' OR a.ASSIGNEE = 'jira_username'
group by a.pkey order by a.CREATED
This is the query to know all issues raised in the last 24 hours.
select REPORTER, SUMMARY from jiraissue
WHERE CREATED > DATE_SUB(CURDATE(), INTERVAL 1 DAY) order by CREATED DESC;

Resources