d-ruiz / kdb_idempiere

Kanban Board plugin for iDempiere
https://wiki.idempiere.org/en/Plugin:_Kanban_Dashboard
GNU General Public License v2.0
5 stars 13 forks source link

Swimlane Date column support #12

Open norbertbede opened 1 year ago

norbertbede commented 1 year ago

i want to define new swimlane rule, by date column. ATM this is not possible, @d-ruiz check the code.

solution: add support for date, datetime column types i.)allow select ii.)allow format the date by sql function. eg. to_char(timestamp_column, 'YYYY-MM')

PeterTakacs300 commented 1 year ago

Hi @d-ruiz,

we have created a POC solution for date Swimlines.

Demo video: https://user-images.githubusercontent.com/93127072/224946227-1494a1cf-83a3-4b49-a775-75c2f1666243.mp4

Setup: Update Validation Rule in System (AD_Val_Rule_ID=1000351):

Patch: kanban_date_swimlines.patch

Currently it has two main issues that are hardcoded:

  1. we are not able to generate the time series based on a Date range kanban parameter (currently hardcoded to now()-interval '7 days', now()+interval '14 days')
  2. we are not able to set the swimlane grouping time unit, currently hardcoded to days
    • possible solution is to add a similar column as Time Group By which we have implemented on Charts (it is not in iDempiere) - you would be able to select the time unit (Year, Month, Week, Day, Hour...) for which you want to group the cards into swimlanes
PeterTakacs300 commented 1 year ago

Hi @d-ruiz.

We would like you to review the attached patch (it could be considered as draft) which contains the following improvements:

Notes about the known issues:

patch: kanbanSwimlanes.patch

d-ruiz commented 1 year ago

Hi @PeterTakacs300, as mentioned before, the pull request is quite big and the second commit changes things that the first commit adds, so it would be very hard for me to review this properly and I don't have that time right now.

As I suggested before, it would be easier if you could split the pull requests into smaller commits. Basically this structure.

What do I need to change and what is missing?

What do I need to refactor to accomplish that? -> Refactor commit

With the refactor what do I need to add to make it work? -> Commit with the new feature

If you mix both things in one single commit, it becomes really hard for the reviewer to analize potential side effects and so on.

Could you split it into, refactoring the methods that were already there and explaining why they need to be refactor, and then adding the new functionality on top (Clean without commits changing what you added before)

Thanks, Diego