Needs work
Project:
Views Calc
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
20 Feb 2015 at 04:58 UTC
Updated:
1 Dec 2023 at 21:20 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jim0203 commentedI've got an old Drupal 6 a client is still using, and it relies heavily on Views Calc. I'd like to upgrade the site to Drupal 8, and would be happy to help out with the Views Calc port to D8 where I can.
Comment #2
justachris commentedI'm interested in helping port Views Calc to Drupal 8. Has any work started on the port?
Comment #3
justachris commentedStarted porting this to D8. I've made good progress so far; configuration for the custom fields as well as module settings are complete. The configuration for the views display format / style plugin is also pretty much complete. Currently working on the display format output and the query modifications that occur to make the calculations happen. Working as an "as-is" port with the necessary D8 updates. Would like to wrap around to the custom field configuration and handle that better with CMI as opposed to the import/export tabs currently present. I hope to have something posted here or on github in the next week or so.
Comment #4
RKopacz commentedLet me know if you need someone to do some testing, I have an immediate need for this module in D8. My PHP / module dev skills are rudimentary but I can do some testing for sure.
Comment #5
justachris commentedI've uploaded a current development version: https://github.com/justAChris/views_calc
This version is very unstable at the moment and is an as-is port, not a rewrite. All of the configuration, views includes and theming has been ported, but only the simplest of calculations currently work without error. There are plenty of TODOs left to resolve, and the queries need careful attention to handle any complex cases. Additionally, the current configuration implementation should be updated to better utilize D8's configuration management for export / import.
I do plan on continuing to work on this port, but if anybody wants to pick it up at greater speed the code is there.
Comment #6
jo1ene commentedI tested this on a personal project and have info. The module installed correctly and the views administration interface appears to be working. No actual calculations are displayed. I assume this just isn't done yet.
Another issue to address is that it doesn't handle hidden empty columns properly. Some node types I setup have numerical values and some do not. Default tables view hides the empty $$$ columns as expected - this does not. See attached.
Comment #7
justachris commented@jo1ene Thanks for taking the time to test it out. The calculations, which are done in SQL, only currently work is the most simplistic cases, generally one simple column without references. There is a bit to review in the SQL to get the calculations working properly in most use-cases. I haven't had any time over the last month to work on this, but will pick it up again soon.
Thanks for the note about empty columns, will also look into that while fixing the rest of the issues.
I definitely admit the port is not in any usable state currently, but wanted to provide the code if anybody felt like running with it.
Comment #8
eme commentedI just tested out and indeed it works with very simple configuration (just one column to sum up in my case). I tested grouping, but it show the total result only (seems normal seeing this thread).
Comment #9
maxilein commentedany progress?
Comment #10
effortdee commentedam interested in this project too, any d8 updates?
Comment #11
alastairworters commentedHello all. Are there any details on the Views Calc port to D8 being completed? There doesn't seem to be any progress in the last two years! I would be happy to 'pitch-in' if required.
Comment #12
pieterbr commentedIs there any progress on this project?
Comment #13
cybertrail commentedAnything new on the D8/9 port?
Comment #14
giupenni commentedIs there any progress?
Comment #16
Christopher Riley commentedAny word on this?
Comment #17
kris77 commentedNews on This?
Comment #18
sjaxon commentedViews Aggregator Plus is a great alternative.
https://www.drupal.org/project/views_aggregator
Comment #19
justachris commentedHave not had a chance to get back to this in the many years since this was first posted. I agree with the above comment that Views Aggregator Plus is a really good alternative. I've used Views Aggregator Plus a few times on projects in the last few years to accomplish what I'd previously used Views Calc for.
Given that, has anybody come across any use cases for where Views Aggregator Plus does not provide the functionality that Views Calc previously did? I completely understand that the way calculations are performed are completely different between the two modules (updating the database query vs in code) and the interface to set up a calculation is different, but it seems like Views Aggregator Plus should be a replacement for Views Calc in Drupal 8,9,10+