CommentFileSizeAuthor
#6 Screen Shot 2016-05-03 at 11.09.17 AM.png108.56 KBjo1ene

Issue fork views_calc-2429973

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

  • 1.x Comparecompare
  • 2429973-port-views-calc Comparecompare

Comments

jim0203’s picture

I'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.

justachris’s picture

Title: Port to Drupal 8 » Port Views Calc to Drupal 8

I'm interested in helping port Views Calc to Drupal 8. Has any work started on the port?

justachris’s picture

Started 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.

RKopacz’s picture

Let 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.

justachris’s picture

Status: Active » Needs work

I'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.

jo1ene’s picture

Issue summary: View changes
StatusFileSize
new108.56 KB

I 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.

justachris’s picture

@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.

eme’s picture

I 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).

maxilein’s picture

any progress?

effortdee’s picture

am interested in this project too, any d8 updates?

alastairworters’s picture

Hello 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.

pieterbr’s picture

Is there any progress on this project?

cybertrail’s picture

Anything new on the D8/9 port?

giupenni’s picture

Is there any progress?

Greg Boggs made their first commit to this issue’s fork.

Christopher Riley’s picture

Any word on this?

kris77’s picture

News on This?

sjaxon’s picture

Views Aggregator Plus is a great alternative.
https://www.drupal.org/project/views_aggregator

justachris’s picture

Have 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+