I’m developing a listener plugin that will set the due date for an issue. The conditions are as following:
- If issue has been assigned to a user
- If an estimate has been set (like 4 days 5 hours)
The idea is to
- Get all the open issues assigned to the user,
- Order them by priority and created date
- Take those (if any) that come after the current issue(due dates of these issues will be shifted forward by the amount of time needed for the current)
- Take the due date of the issue (if any) that comes right before the current issue.
- Set the due date of the current issue based on previous issue due date.
- Shift the due dates of the issues that come after the current issue accordingly
For this, I need to take working days and hours (also non-working days) into account to get an accurate due date. How do I access that information? Also, does it matter if it’s agile or basic software development project?
P.S. I know that there are still more concerns about the logic of the plugin, like what if due date is set manually. I tried to concentrate on the main issue here.