Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Export tickets that I made a comment in the previous month

Haris Arifovic
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 22, 2025

I would like to create a Python Automation where I get all the tickets (link, subject, description) that I made a comment on, in the previous month (December 2024).

Is there any way to do that?

2 answers

0 votes
Aron Gombas _Midori_
Community Champion
January 23, 2025

You can use the WAS operator on the Assignee field and then you can fully rely on built-in JQL capabilities.

If you need to do this time to time and do some calculations on the result, you may want to automate the process with Better Excel Automation.

(This app is developed by our team.)

0 votes
Robert DaSilva
Community Champion
January 22, 2025

Hi @Haris Arifovic , welcome to the Community!

Unfortunately, there is no native way that I am aware of to find all Jira Issues that you have commented on.

 


There should be a way to capture this data though, and that's through external, 3rd party add-ons for Jira Cloud.

One in particular is Enhanced Search for Jira, which has a commentedBy() function. This function allows you to provide either the currently logged in user, or the unique ID for any Atlassian Account. The results will be a list of Jira issues that were commented on by that given user. You can then add additional filters for the last Updated Date of the issue, which then will restrict based on the last time a Jira Issue has been updated.

Unfortunately, there is no way that I can find to link both, such that the filter returns issues where a comment was from a given time frame.

 

If this does work to achieve your goal, I would recommend saving this as a named filter to the system, and then using the Atlassian REST APIs to request the Jira Issue list using that named filter as the input. 

I would recommend the Get Issues via JQL function here: https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issue-search/#api-rest-api-2-search-jql-get

 

If you want to avoid Python, you should also be able to use the Jira Filter Subscriptions feature to generate automatic reports on a given time frame. You can learn more here: https://support.atlassian.com/jira-software-cloud/docs/manage-filters/#Create-an-email-subscription-for-a-filter

 

Hope that helps!

Robert

Haris Arifovic
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 22, 2025

Hi Robert, thanks for the response, I will check it out!

The main reason I’m looking for this is that I have to report all tickets I worked on from the previous month. I usually comment those tickets, that’s why I went that way.  If you have some better solution for that, please share. Another factor besides commenting is that I know I was assigned to the ticket at some point of it’s lifecycle. Maybe that helps.

Thanks!

Dmitry Astapkovich _Colined_
Atlassian Partner
January 22, 2025

Hi @Haris Arifovic ,

As an alternative, you can use one of Marketplace reporting apps. E.g. we are developers of Pivot Report, which can report on comments:

SCR-20250123-dfk.png

You can export this report to Excel or a static HTML snapshot. 

Here's a demo report you can play with: 

https://demo.colined.com/plugins/servlet/pr/report?report=404 

Robert DaSilva
Community Champion
January 23, 2025

@Haris Arifovic There may be a more simple way to get this data then.

If you knew you were assigned an issue at some point in the issue's life cycle, AND you know the date range you care about, you can get a report via a simple JQL query:

assignee was in (currentUser()) AFTER 2025-01-01 BEFORE 2025-02-01

This JQL will find all issues where the current user, you, were in the assignee field. The BEFORE and AFTER portions are the date ranges you care about. So in this case, you would want to set the AFTER to December 1st, and the BEFORE to January 1st.

You could instead use the DURING operator instead, and provide the two dates within brackets.

Here's more information on the available operators JQL will allow: https://support.atlassian.com/jira-software-cloud/docs/jql-operators/#WAS

Either way, I would recommend experimenting with what JQL works best for you.

In terms of automating this, you still have the two options I mentioned before:

  1. You can send the JQL query via the REST API to get a list of Issues, or
  2. You can configure a Filter Subscription to have the list sent to you by Jira automatically on a set schedule

 

I would recommend going with the Filter Subscription, as that won't require intervention by you to get the report.

Hope that helps!
Robert

Like Aron Gombas _Midori_ likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events