EPSCoR / ERCore

ERcore content management system to assist with NSF EPSCoR reporting
4 stars 7 forks source link

Accomplishments page export not filtering all content by date range #44

Closed tschet closed 8 years ago

tschet commented 8 years ago

I made a clean install of Drupal and added the newest ERCore.

  1. I added two external engagements, one in 2014 and one in 2016
  2. I added two collaborations, one in 2014 and one in 2016

When I set the date range of the accomplishments page to a range within 2015 and export the reports, Table D shows the results of both external engagements. Table C shows both Collaborations.

khuffman commented 8 years ago

@tschet Did you set the "end dates" for Collaborations and the Calendar Event that the Ext. Engagement is associated with? We had a similar issue last year, see https://github.com/EPSCoR/ERCore-3.1/issues/26

tschet commented 8 years ago

I put in end dates for all content. To keep my example as simple as possible, I ended the collaborations in the same calendar year they started. Events were one hour in duration. Nothing should have been active in the 2015 calendar year.

aturling commented 8 years ago

I tried testing it here: http://dev-ercore.nmepscor.net/content/test-collaboration-2014 but I can’t get it to show up in a year other than 2014. I did notice that if you choose the same month & year for start and end dates, the next time you edit the content, the end date is missing. http://dev-ercore.nmepscor.net/node/144/edit <-- “show end date” box is unchecked

tschet commented 8 years ago

I chose January to December, so mine did not revert to an open date. If it had, it would have explained the one of the two collaborations displaying in the report. It would not have explained why the 2015 report displays a 2016 collaboration.

Note: Drupal date field default is to always save an end date to the database if an end date is allowed. If the start and end dates match, it considers it an open ended date. An odd choice, but consistent within Drupal.

tschet commented 8 years ago

Looking at the code for Table C (pages/collaborations.inc) and Table D (pages/external-engagement.inc), I see no reference to dates or ranges. The files for Tables B (pages/participants.inc) and E (pages/outputs.inc) both have code related to date filtering. I'm not seeing how the current module could filter Tables C and D by date at all.

khuffman commented 8 years ago

@tschet did you look at issue 26? especially this comment: https://github.com/EPSCoR/ERCore-3.1/issues/26#issuecomment-123889499 Here is the commit @aturling made: https://github.com/EPSCoR/ERCore-3.1/commit/f7acbed1c58ad80ea699c63f6529b74f9ef2f4d4 I think these changes are on NM-dev site, not sure but @cjallen-epscor should be able to tell you.

aturling commented 8 years ago

It sounds a lot like the same issue. I added the applyDateRange functions to the code for tables C and D in branch "3.1.1-tablesfix” and then merged that branch into 3.1.1 on Aug 7 2015. 322a49d191cccc67f1fd0bde5f421bb00378e518

khuffman commented 8 years ago

Sorry my fault, I just found that @aturling commit the changes I mentioned to the main branch https://github.com/EPSCoR/ERCore-3.1/commit/322a49d191cccc67f1fd0bde5f421bb00378e518 so the should be in the main branch.

cjallen-epscor commented 8 years ago

@tschet @aturling

Yes @khuffman - I did make the commit (f7acbed) to dev-ercore.nmepscor.net

tschet commented 8 years ago

I just rebuilt my local test site for the third time in two days. Downloading Drupal and ERCore and everything from scratch. This time it's working just fine. I have no idea why a clean install failed two out of three times. I think I'm more confused than ever, but glad it appears to be working.

iserna commented 8 years ago

@tschet have you had any luck debugging the ND site?

tschet commented 8 years ago

Yes, the site was missing the update suggested above. I'm not sure why it wasn't fixed when I updated the module. I'm also not sure why I had the same problem with the new version the first two times I downloaded it. The first two times I downloaded the zip format, the last I used git, but the files seem identical when I test that now. The date filter code is plainly visible when I look now, but as I referred to in my comments above, I couldn't find the date filtering section of the code with the version I downloaded first. I suspect if I somehow downloaded an older version, but I don't see how I did it the same twice.

iserna commented 8 years ago

Resolved!