wekan / wekan

The Open Source kanban (built with Meteor). Keep variable/table/field names camelCase. For translations, only add Pull Request changes to wekan/i18n/en.i18n.json , other translations are done at https://app.transifex.com/wekan/wekan only.
https://wekan.github.io
MIT License
19.54k stars 2.83k forks source link

Feature-Request: Number of cards per list and sum of custom number field in list head #3796

Open itbreitenstein opened 3 years ago

itbreitenstein commented 3 years ago

Hello,

first thanks for your support.

We like to implement the wekan system to support the manufacturing workflow of one of our customers.

At first we need to display of the amound of cards for every list (shouldnt be a big thing or maybe even already exists?)

Another request is to display the sum of a custom card field (number / currency) for example we have 10 cards in a list with custom (or maybe static) field named "order volume" and need to display the sum of the value of all cards containing this field in the header of the list. So if each card has an order amount of 10$ there should be displayed 100$.

We would pay for this features and hope it is not a big deal to implement it.

xet7 commented 3 years ago

@itbreitenstein

At first we need to display of the amound of cards for every list (shouldnt be a big thing or maybe even already exists?)

  1. Login to Wekan
  2. Click right top your username => Change Settings => Show cards count if list contains more than => insert number 0 => Apply.

Please test does it work well enough.

Another request is to display the sum of a custom card field (number / currency) for example we have 10 cards in a list with custom (or maybe static) field named "order volume" and need to display the sum of the value of all cards containing this field in the header of the list. So if each card has an order amount of 10$ there should be displayed 100$.

We would pay for this features and hope it is not a big deal to implement it.

That would cost 500 euro. Pre-payment options are at https://wekan.team/commercial-support/

itbreitenstein commented 3 years ago

Awesome I appreciate your way of fast support and implementing new features.

The solution of card count was exactly what I was looking for.

500 EUR is okay for us! I will pay it if our costumer agrees with it. It could take some time. Could you estimate how long it will take until you implement this feature after I made the payment?

Thanks a lot!

xet7 commented 3 years ago

@itbreitenstein

About one month.

kyhuynhduc commented 3 years ago

@itbreitenstein

At first we need to display of the amound of cards for every list (shouldnt be a big thing or maybe even already exists?)

  1. Login to Wekan
  2. Click right top your username => Change Settings => Show cards count if list contains more than => insert number 0 => Apply.

Please test does it work well enough.

Another request is to display the sum of a custom card field (number / currency) for example we have 10 cards in a list with custom (or maybe static) field named "order volume" and need to display the sum of the value of all cards containing this field in the header of the list. So if each card has an order amount of 10$ there should be displayed 100$. We would pay for this features and hope it is not a big deal to implement it.

That would cost 500 euro. Pre-payment options are at https://wekan.team/commercial-support/ Hi @xet7 how about show the number of card in board like mockup bellow

ps: can we pull source code to edit and comit back to comunity?

Ảnh chụp Màn hình 2021-05-09 lúc 19 34 53
helioguardabaxo commented 3 years ago

@kyhuynhduc This is a very useful feature. I guess that you could send a pull request with your code. I only would rename these strings:

xet7 commented 3 years ago

Moved to here from #4054

From @signalcodec

This is an issue that's just seemed to have popped up.

When generating a card through the API, and editing the card to include values in some Custom Fields, the card is spawning a duplicate version of the field.

Both completely editable, but their Custom Field ID is the same.

This is what the card looks like: image

This is what it looks like when I request the card details over API: image

Same ID, different values, confused me.

Reply From @xet7

Yes, that's correct. This is also related to current In Progress development of this Sum of Custom Fields at List Head.

Custom Fields are saved in Activities Table/Collection. So newest Custom Field value is the one with newest modifiedAt value. Previous values are also still in Activities. This could also be used to sho history of some Custom Field.

For example, this kind of Javascript MongoDB database query gets the newest one field:

db.activities.aggregate([
   { $match: { value: { $exists: true }, activityType: "setCustomField", boardId: "YvvPE6kbiyKnWjYMK", listId: "bSifYDiRQffSKPSeq", cardId: "emw2qsg26Y8HAyMqc", customFieldId: "DBhMAY74wfF828GvP" } } ,
   { $group: { _id: "$customFieldId", modifiedAt: { $last: "$modifiedAt" }, total: { $last: "$value" } } }
])

At clientside, newest value is used in calculations. But if all cards have not been loaded to clientside, it's better to do calculations at serverside.

With code at serverside, it is needed to search newest Custom Fields, sum them together, and return that sum back to list header for example by using Meteor Method.

Yes, it would maybe be easier if:

But it is not actually easier, because:

What does everyone think about this?

xet7 commented 3 years ago

@signalcodec

Custom Field IDs are at: 1) Board Custom Fields 2) Same ID at card, saved to Activities, newest is the one that has newest modifiedAt

xet7 commented 3 years ago

I'm thinking, that newest Custom Field values should be saved somewhere, where is only newest Custom Fields values. Similarly to comments etc. Deleting Activities should not affect anything, it could delete history, but newest Custom Fields, Comments, etc should still be there. I'll think is it possible to do this, and with what kind of changes to code.

xet7 commented 3 years ago

That kind of changes would also help in fixing Board Settings => Card Settings where to make Comments or System Messages etc visible.

er0gl commented 2 years ago

@itbreitenstein

At first we need to display of the amound of cards for every list (shouldnt be a big thing or maybe even already exists?)

  1. Login to Wekan
  2. Click right top your username => Change Settings => Show cards count if list contains more than => insert number 0 => Apply.

Please test does it work well enough.

Another request is to display the sum of a custom card field (number / currency) for example we have 10 cards in a list with custom (or maybe static) field named "order volume" and need to display the sum of the value of all cards containing this field in the header of the list. So if each card has an order amount of 10$ there should be displayed 100$. We would pay for this features and hope it is not a big deal to implement it.

That would cost 500 euro. Pre-payment options are at https://wekan.team/commercial-support/ Hi @xet7 how about show the number of card in board like mockup bellow

ps: can we pull source code to edit and comit back to comunity? Ảnh chụp Màn hình 2021-05-09 lúc 19 34 53

Is there a way and chance to contact you? I'd love to implement this in to our Board.

chrisi51 commented 2 years ago

@xet7 is the sum feature of custom fields in active development?

xet7 commented 2 years ago

@chrisi51

Yes, I try to get it working and added to WeKan soon.

chrisi51 commented 2 years ago

btw. at the moment the number field only accepts integer. can you change this to float? would be nice for the summed feature to be able to also input decimals

until the summed feature is working, we can workarround by using the normal text field

helioguardabaxo commented 2 years ago

Hi @xet7 I am trying to create a Cumulative Flow Diagram for a specific board. For this its needed to count cards per list. I think get_list API route could return this counter. Other way would create a new API route, list_cards_count, for example.

What do you think?

xet7 commented 2 years ago

@helioguardabaxo

You can add get_list_cards_count

Thanks!

helioguardabaxo commented 2 years ago

Good! I sent PR #4424 for this. Thanks!

helioguardabaxo commented 2 years ago

Hi, @xet7 I am trying to implement "Number of cards per list" on "All boards" and members avatar (like #4415). "Number of cards per list" is a bit different than proposal above. All lists of a board are shown. These two features has checkbox to enable or disable.

Are these interesting to send a PR?

Thanks!

xet7 commented 2 years ago

@helioguardabaxo

Please send PR. Thanks!

DerHerr95 commented 2 years ago

Has anything happened in the last few months?

xet7 commented 2 years ago

@DerHerr95

Yes, a lot of internal design changes, features, speedups etc are In Progress, but those are not visible until they are finished.

DerHerr95 commented 2 years ago

Great, thank you! Nice to hear :)

Can you already estimate when that will be ready?

xet7 commented 2 years ago

@DerHerr95

Those all are so major changes, that it really depends on each feature how many retries it requires to get each feature working, can I for example fix current Meteor WeKan API etc (I just got some example code from some Meteor developer), or does some of my other WeKan prototypes become more advanced. I did give 10min presentation about it today https://wekan.team/multiverse.pdf

itbreitenstein commented 2 years ago

I ordered and paid for these features a year ago and paid xet7 instantly.

I'm still waiting for the sum of a custom field and he doesn't even respond anymore.

Finally I gave it to my lawyer a few days ago to enforce the delivery of the features I paid for!

xet7 commented 2 years ago

@itbreitenstein

I do respond to emails, but I don't see recent email from you. I would prefer people to contact me, it would help a lot more, because I'm developing those features. I have not received any email from any lawyer.

xet7 commented 2 years ago

And I would really prefer more encouragement, and not more stress https://github.com/wekan/wekan/issues/1122#issuecomment-1161385620

DerHerr95 commented 2 years ago

@DerHerr95

Those all are so major changes, that it really depends on each feature how many retries it requires to get each feature working, can I for example fix current Meteor WeKan API etc (I just got some example code from some Meteor developer), or does some of my other WeKan prototypes become more advanced. I did give 10min presentation about it today https://wekan.team/multiverse.pdf

Thank you for this answer! :)

P.S:

I read your last comment (https://github.com/wekan/wekan/issues/3796#issuecomment-1173929951)

I don't want to stress you :)

Beautiful work! Thanks a lot! :)

xet7 commented 2 years ago

Those planned additional database support of changing MongoDB to SQLite would really help with this sum feature, because when I tried to code MongoDB query for this, it did become very complex and I did not get it working yet, with MongoDB Javascript syntax. It would be much easier to make that sum with SQLite or some other SQL database.

Changing to SQL database would very likely fix also these bugs, and improve performance a lot:

xet7 commented 2 years ago

I just listened this podcast about velocity, estimates etc, kind of related:

https://changelog.com/gotime/236

Related to Go, I today did write some Go code, trying to get it to copy attachment from MongoDB to filesystem, but did not get it working yet. It seems I did not yet commit it to git, I'll try later add it to my MongoDB prototypes at https://github.com/wekan/hx/tree/main/prototypes/database/MongoDB

xet7 commented 2 years ago

Found this, reading it thinking how make this sum feature work with bigger amount of lists:

xet7 commented 2 years ago

Although, now that I think more about it, I don't know is that relevant at all. If everyone looks only at small part of screen, where small amount of lists and cards are loaded (in upcoming optimization), amount of sums is small.

But, if someone has very big touch screen like at https://github.com/wekan/wekan/discussions/3958 , and their use case is still to see as much as possible, and have it update realtime, well, hmm. Current WeKan users like the current features WeKan already has, realtime etc. So other way would be to:

  1. Minimize to only HTML/CSS
  2. Add back Javascript drag-drop, etc, minimal code
  3. Keep updates realtime some way. Maybe not with websockets #4570 . But if there was some specific database query to apply changes that have happened since previous update, like updating every 10s, that would take less server load than updating everything immediately. Or alternatively, backend code checking server load, and if there is enough capacity, then check updates more often. But I'll think what would be best way.
xet7 commented 2 years ago

There are some hacky ways to do realtime updates without Javascript at frontend, but those are kind of hacky, I have not yet tested how well they work: https://github.com/wekan/hx/wiki/Frontend-Browser-No-Javascript

helioguardabaxo commented 11 months ago

Hi @xet7!

I found this repo and like it: https://github.com/6pac/SlickGrid

Would it be a alternative to show sum of custom number field? Another board view(for example, "Grid" or "Table") http://6pac.github.io/SlickGrid/examples/example-totals-via-data-provider.html

xet7 commented 11 months ago

@helioguardabaxo

You can try, does it work, and how.