Skip to content

feat: aging report of tickets#283

Merged
haiphucnguyen merged 1 commit intoflowinquiry:mainfrom
MrChatterjee98:main
Dec 30, 2025
Merged

feat: aging report of tickets#283
haiphucnguyen merged 1 commit intoflowinquiry:mainfrom
MrChatterjee98:main

Conversation

@MrChatterjee98
Copy link
Copy Markdown
Contributor

@MrChatterjee98 MrChatterjee98 commented Nov 8, 2025

Aging reports for tickets

I have raised this as a first draft, I will smoothen the changes optimize the code further to reduce duplication
A feature implementing the tickets aging report.

Changes Made

Additional Notes

Copy link
Copy Markdown
Collaborator

@haiphucnguyen haiphucnguyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good first attempt for this PR @MrChatterjee98 . I leave some comments. There are some parts I don't know how to implement it efficiently yet (the part of grouping attribute). But the comments are enough for the second version of this PR :)

@MrChatterjee98
Copy link
Copy Markdown
Contributor Author

@haiphucnguyen I have addressed all the comments, however I am having some issues with filtering by the Priority. While I figure that out and unit tests (hopefully by tomorrow) you can add your reviews for the rest of the code.

@haiphucnguyen
Copy link
Copy Markdown
Collaborator

@haiphucnguyen I have addressed all the comments, however I am having some issues with filtering by the Priority. While I figure that out and unit tests (hopefully by tomorrow) you can add your reviews for the rest of the code.

Sure @MrChatterjee98 . Yeah, i also just commented to ask you write some tests :). Looking forward to your update

@MrChatterjee98
Copy link
Copy Markdown
Contributor Author

@haiphucnguyen Please check out the final changes from my end with added tests

Copy link
Copy Markdown
Collaborator

@haiphucnguyen haiphucnguyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @MrChatterjee98, thank you so much for your contribution!

I’d like to take a bit more time to review the implementation thoroughly and will share detailed feedback by this Friday (possibly sooner).

The reason for the delay is that we’re planning to support multiple report types, so I’m exploring a more generic and reusable approach for generating reports, something that would also make writing report APIs easier going forward.

Thanks again!

@haiphucnguyen
Copy link
Copy Markdown
Collaborator

Hi @MrChatterjee98 , I am going to create a PR to demonstrate a new reporting api and add you as a reviewer. You please let me know how that approach work, then see if you can apply to this PR. Please keep me some days :)

@MrChatterjee98
Copy link
Copy Markdown
Contributor Author

Gladly 😀

@haiphucnguyen haiphucnguyen mentioned this pull request Dec 16, 2025
@haiphucnguyen
Copy link
Copy Markdown
Collaborator

Gladly 😀

Hi @MrChatterjee98,

I created a follow-up PR (#287
) based on your work. It’s not fully complete yet—specifically, the tests for TicketAgingReportControllerIT and TicketAgingReportServiceIT are still in progress.

The original requirements around buckets turned out to be quite complex, so I simplified the approach and adjusted the implementation accordingly. The changes are largely aligned with your PR.

I plan to continue working on this tomorrow. If you’re okay with it, I can close my PR afterward and you can continue working on your original PR, or we can go with whichever approach you prefer.

Thanks again for the solid work!

@MrChatterjee98
Copy link
Copy Markdown
Contributor Author

@haiphucnguyen

I took a look at your PR and I would be happy to implement those changes and update my current PR. However, I have some observations.

  1. I noticed that the filtered tickets age is calculated they are only sorted based on age but not grouping is done i.e., the buckets are not present, is it a part of the simplifications of the requirements?
  2. I also noticed that we do not have any provision to calculate already closed tickets, Although I think you're trusting me to implement that as a part of my PR 😄.
    long ageInDays = ChronoUnit.DAYS.between(ticket.getCreatedAt(), Instant.now());

if you think my observations are correct, I will go forward and make the changes to my PR and update it as

@haiphucnguyen
Copy link
Copy Markdown
Collaborator

@haiphucnguyen

I took a look at your PR and I would be happy to implement those changes and update my current PR. However, I have some observations.

  1. I noticed that the filtered tickets age is calculated
    they are only sorted based on age but not grouping is done i.e., the buckets are not present, is it a part of the simplifications of the requirements?
  2. I also noticed that we do not have any provision to calculate already closed tickets, Although I think you're trusting me to implement that as a part of my PR 😄.
    long ageInDays = ChronoUnit.DAYS.between(ticket.getCreatedAt(), Instant.now());

if you think my observations are correct, I will go forward and make the changes to my PR and update it as

You're absolutely right @MrChatterjee98 😀 That’s the foundation for the PR, so feel free to add anything that’s missing. I realize I made the requirements too complicated at the start, sorry about that. The bucketing logic is very complex, and most of the time users don’t really need it. If they do, we’ll provide a custom solution for each customer instead of a generic one for everyone.

@MrChatterjee98 MrChatterjee98 changed the title feat: First draft for aging report feat: aging report of tickets Dec 24, 2025
@MrChatterjee98
Copy link
Copy Markdown
Contributor Author

MrChatterjee98 commented Dec 24, 2025

@haiphucnguyen I have updated the PR code according to the PR you provided, and I will be updating the tests soon. Merry Christmas 😃

Edit 1: I have added new unit tests. Please take a look

P.S: Aging is American English while Ageing is British English I was following the latter for naming my services and functions (as I am used to it), however I have reverted it to Aging everywhere in case I have missed please let me know via the comments in PR.

Copy link
Copy Markdown
Collaborator

@haiphucnguyen haiphucnguyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LTGM, except some method names should be changed. Thank you @MrChatterjee98

@MrChatterjee98
Copy link
Copy Markdown
Contributor Author

Most of these functions/classes are named during the first draft, I'll update them and let you know

@haiphucnguyen
Copy link
Copy Markdown
Collaborator

Most of these functions/classes are named during the first draft, I'll update them and let you know

Thanks @MrChatterjee98

@MrChatterjee98
Copy link
Copy Markdown
Contributor Author

MrChatterjee98 commented Dec 30, 2025

@haiphucnguyen Please take a look I have changed the names, also for some reason the CI pipelines failed can't figure out why? For my forked repo I re-ran them, and they seem to be working link

Copy link
Copy Markdown
Collaborator

@haiphucnguyen haiphucnguyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @MrChatterjee98, for your ongoing contributions.

@haiphucnguyen
Copy link
Copy Markdown
Collaborator

@haiphucnguyen Please take a look I have changed the names, also for some reason the CI pipelines failed can't figure out why? For my forked repo I re-ran them, and they seem to be working link

No worries, @MrChatterjee98. I re‑ran the workflows and they all passed. It looks like a GitHub intermittent build issue.

@haiphucnguyen
Copy link
Copy Markdown
Collaborator

If you’d like to jump in, feel free to pick any open issue #274, which covers both front‑end and back‑end work. You’re welcome to open a brand‑new issue and build it from scratch. Your contributions would be a huge help to the project!

@haiphucnguyen haiphucnguyen merged commit 50f0c33 into flowinquiry:main Dec 30, 2025
9 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants