Issues commented by me in JIRA - 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;

Related

get a specific user's comments in Jira 8.5.0

I use Jira Server, I am trying to get a specific user's comments in advanced search with JQL. I don't want to use plug-ins. In other posts (which are mostly for Jira Cloud) I ve seen and I tried these:
comment ~ "user.name", comment ~ user.name, comment ~ currentUser(), comment ~ currentUser() OERDERBY createdDate DESC or issueFunction in commented("by user")in this and this posts.
However none of these return a result, what I see is:
No issues were found to match your search
Does anyone use Jira Software 8.5.0 Server and experienced such issue ?
I tried using issueFunction method and it does return me list of issues commented by an specific user.
For example, my user name is vikkumar then the syntax will look like this
issueFunction in commented("by vikkumar")
Let me know if this works.
Thanks.

JQL : show last updated tickets but not by me

In JIRA I would like to show the last updated tickets (ORDER BY updated DESC) that were updated by someone that isn't me (filter).
Is there a way to do it?
Thanks in advance.
There no way to do this with JQL. Only update date is stored.
The closest you can get is using "was" which can be used with status changes or resolution, for example to query something like: status was closed by bob
If you use scriptrunner you also get a similar function for comments: issueFunction in commented("after -4w by jbloggs")
And for work logged: issueFunction in workLogged(on "2015/07/28" by admin)
But probably this would be the closest to what you are looking for:
lastUpdated (by / inRole / inGroup) Finds issues by the user who last
updated them. Example, find all issues that were last updated by
members of the Developers role:
issueFunction in lastUpdated('inRole Administrators')
Hope it helps you

Jira - JQL "WAS" Operator

Im trying to search for all the issues assigned to an user, but no results are being returned and i cant figure out why.
My JQL is the following:
project = MYPROJECT and assignee was joaoalves
In the docs it says:
The "WAS" operator is used to find issues that currently have, or previously had, the specified value for the specified field.
(Note: This operator can be used with the Assignee, Fix Version, Priority, Reporter, Resolution and Status fields only.)
I have an issue assigned to the user joaoalves, but when i search with the JQL above no issues are returned.
But if run the following JQL the issue is returned:
project = MYPROJECT and assignee = joaoalves
Am i missing anything?
It works in my instance, and return issues that currently or previously assign to me. Which version of JIRA are you using?
Assignee was will return the issues which were previously assignee to tat user and current tickets which are present on that user.
Try in conjunction with the "DURING" clause and specify a timeframe. Like this -
project = MYPROJECT and assignee was joaoalves DURING ('2017-04-16 23:59', '2017-04-19 23:59')
See: https://confluence.atlassian.com/jiracore/blog/2015/07/search-jira-like-a-boss-with-jql
The was operator is looking for issues where the assignee was joaoalves but is currently not that user.

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.

List of all jira tasks that I was assigner on

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

Resources