Jira / Cards assigned to a user in a given timeframe - jira

We use Jira extensively in our project, and I am attempting to create some custom reports which should list all cards assigned to a user within a given timeframe.
For example: Get all cards I worked on in August 2014.
Is that even possible without direct DB access?
P.S. I have tried playing with the update timestamp, yet it will then also list cards which were assigned to me anytime but not necessarily in the timeframe I am interested in. This will NOT work -->
assignee = currentUser() and updated > "2014/08/01" and updated < "2014/10/31"

Should be like:
assignee was currentUser() DURING ("2014/08/01", "2014/10/31")
From looking at the Advanced Searching documents.

Related

Is there any way to find the logged hours in particular day by you in JIRA?

Is there any way to check how many our you have logged today in JIRA?
I don't have admin or super user access in JIRA, I am a programmer and am assigned sprint tasks, so my permissions could be limited. I don't find any option to check how many total hours I logged today in different tasks.
One way I guess could be to go to the tasks and check the history, but that is useless because the main problem is that only that I want to know the tasks on which I logged hours.
Is there any way?
Assuming you have the most recent versions of Jira, the following should work for you...
Go on navbar -> Issues -> Search for Issue -> Advance Search
Today:
worklogDate = endOfDay() and worklogAuthor = currentUser
Specific date:
worklogDate = "2015/07/10" and worklogAuthor = currentUser
This would filter all issue to only issues that you logged your work on.
Also you may save the issue search for later reference.
Note: Valid formats include: 'YYYY/MM/DD', 'YYYY-MM-DD', or a period format e.g. '-5d', '4w 2d'.
Hope this helps
Please find the below navigation
Go in your project -> Left Menu select the Reports -> In All Reports -> Go into the Time Reports -> select the start date and end date
Now, you find out the logged by you.
Also, there is direct link but you need to change based on your jira domain and project
https://jira_domain/plugins/servlet/ac/timereports/timereports-report?project.key=jira_project_key&project.id=jira_project_code
Please let me know if still anything else you need.

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 - 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.

How do I query Jira to search for all issues in a project for which no user has logged work in last week?

I need a way to get all the issues (which are not resolved or closed) of a particular project for which no user has logged work in last week.
For example, let's say I have a project = 'abc' with five issues 'i1', 'i2', 'i3', 'i4' and 'i5' and there are two users 'u1' and 'u2' who can log work in these issues.
Last week - 'u1' logged work in issues 'i2' and 'u2' logged work in issues 'i2' and 'i3'.
So the desired result is - 'i1' and 'i4'.
Something like
project = ABC and status not in (Resolved, Closed) and worklogDate > startOfDay(-7)
should work.
You can do this by installing the Script Runner plugin and using JQL to query for workLogged information:
project=ABC and status not in (Resolved, Closed) and issuefunction not in worklogged("after -7d")
If you need to do fancier queries based on the attributes of the users and so forth, see the commented() documentation for reference.

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