EPSCoR / ERCore

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

Data Integrity Check View Reporting Year Dates #57

Closed ercore closed 8 years ago

ercore commented 8 years ago

NM EPSCoR just discovered that the Data Integrity Check view reporting dates are Missouri's reporting year, Start = 8/1/2014 to End 7/31/2015. For NM it is was off by a year but we fixed it.

@aturling since every jurisdiction has a different start/end date do you know if we can hook into the er core reporting dates? Where it would automatically detect the dates upon install? Or would it be easier to default the dates to none and then add instructions to the installation guide?

Thanks, Isis

khuffman commented 8 years ago

Beside the reporting date, there is another small change needed, around line 1236 there is a /missouri/content/ path that needs to be changed as well.

aturling commented 8 years ago

The "/missouri/content" part comes from the Potential Duplicates attachment. I think this attachment might need to be disabled/deleted when distributed to other jurisdictions because I don't know how to generalize it. This attachments searches for two or more nodes of the same content type with the same title. Since the query uses aggregation, I can't add "path" to the query or it won't count the results properly because each of these nodes will have a different path. So the PHP code at the end is using the fact that, on our site, all of our content aliases are of the form "/missouri/content/[title from pathauto_cleanstring]" with duplicates having -0, -1, etc. attached to the end, and this allows me to create direct links to the nodes so they can easily be inspected to see if they actually are duplicates. But some jurisdictions may use a different convention or just use /node/[nid] for all of the paths and then I don't know how to create the links.

The date issue though I was able to fix using variable_get('er_start_date'). See if this works here: http://dev-ercore.nmepscor.net/admin/epscor/views/check (assumes a 5 year duration - is this always true?)

and the corrected view is here: http://dev-ercore.nmepscor.net/admin/structure/views/view/er_data_integrity_check/edit/page?destination=admin/epscor/views/check

ercore commented 8 years ago

@aturling your fix for the dates worked! Yes, all Track 1 awards are for 5 years.

I am not sure how to tackle the Potential Duplicates attachment issue. It is working on our site but I do believe Chris fixed/updated the links.

cjallen-epscor commented 8 years ago

@aturling - yes, I recall now removing '/missouri' from the output and changing to $pre_url = '<a href="/content/'; for our local install. You are also correct in that we would not know other (future) jurisdictions paths of their Drupal reporting site. We could maybe remove this view for now and list instructions for how to install/modify this view if others would like it. Or even make it available to import somewhere else (e.g - http://epscorreporting.com)

ercore commented 8 years ago

@cjallen-epscor and @aturling I think for now it is fine to commit the view minus this feature. And we can add directions on how to add/modify the view for those who want it and who know how to add it. Though, I would like to propose that we add the view/instructions to this GitHub project Wiki instead of the website. Keep it all in one location. What do you all think?

cjallen-epscor commented 8 years ago

That sounds fine to me. I will remove the "Potential Duplicates" view and commit this Integrity Check view to the 3.2-dev branch.

cjallen-epscor commented 8 years ago

This view has been committed to 3.2