Automatic Report Approval


#1

Currently in Ushahidi 1.0.1 reports submitted via web must be verified and approved before being displayed live. Is there a straightforward way of bypassing that process or automating it via cron? If not I think that would be a great feature.


In addition, currently email, twitter, sms goes into a messages area for viewing by the admin. There is also an option to make a report from those posts, yet again requiring human intervention. While possibly more challenging to do, it would be great to automatically post messages as reports without human intervention, even if a lot of information and location is missing.


Perhaps you can tell that I'm not working on a typical Ushahidi installation :)



#2

Hi Blake,


I was thinking the same thing - something along the lines of tweak the tweet (http://tinyurl.com/yjfrjv6). Each #hash name would be a field name followed by the value. Not sure if Ushahidi does geocoding, but for #loc you could submit lat,long if you had a GPS enabled phone. This could still be reviewed, but on acceptance the app would read in and store field values.


Along these same lines I was thinking about more user friendly db customization access ala Listphile (http://www.listphile.com). Another useful feature would be a marker selector for categories. This kind of system would be highly adaptable and could be set up by small community groups for all manner of PGIS (eg, forest conservation, property boundaries, illegal mining).



#3

Second that. I am looking for a way have a more open input process, where all messages are automatically "approved", though not necessarily verified.


Is there a way in settings or somewhere else to set a standard value for the status?


Or do we need to tweak the code, and what would be the best way in that case?


I believe that this option is important for use cases where the accuracy of the info may be less important, emphasis is more on the community involvement and growth...



#4

I think this is a very important feature to add, ASAP. Certainly for our needs its very cumbersome to have to approve all reports. Ideally, there would be select user accounts where approval is automatic when submitted from the web, perhaps verifying their identity through OAuth or something via their email provider.



#5

I'm setting up an ushahidi for Kamukunji, Kenya. Here are some of my workarounds for these problems:


site: http://tinylurl.com/kamuku


auto-approval:

bulk uploading reports from CSV works (we're collecting lots of reports in another web form that supports CSV export). You can set it to be approved and verified upon upload.


twitter:

search for the #keyword in your twitter web page and scroll to the bottom. Click on the RSS link button and paste the RSS into your news import tool in ushahidi. Reports will appear on "official and mainstream news" section by default. You must still create reports from them afterwards.


I SECOND having AUTO APPROVE turned ON for all reports as a default option one could set. We want people to use the site, and delay in updating is a major hurdle.



#6

@marcmaxson - You have some very interesting work arounds; I especially like the idea of importing twitter via RSS.


One thing I'm going to work on today is figuring out how to set up cron to automatically approve reports every 5 minute by directly altering the database. It isn't so pretty, but I'm also not much of a programmer ;)



#7

To auto-approve posts immediately, here is a quick hack, edit the file application/controllers/reports.php and add this line


$incident->incident_active = 1;


just prior to the line that says $incident->save(); // STEP 3: SAVE CATEGORIES

I'm working on a patch to submit shortly that handles this and offers a settings option to more easily turn this on/off.



#8

Slick. I like it.


@jwestfall, let me know the next time you are in Washington DC. I'd like to buy you a cup of coffee =)



#9

This didn't work for me :(



#10

Thanks a lot! This worked for me!


For people trying this, it looked like this for me:


$incident->incident_dateadd = date("Y-m-d H:i:s",time());

$incident->incident_active = 1;

$incident->save();


You only need to add the one line, its at line 346 of the reports.php



#11

My auto-approve CRON JOB method appears to have worked on bluehost. I do like the php-level hack.


Next - I'm doing a LOT of bulk uploading CSV now, so I like that it has an auto-approve option on it (just add a column for approved, verified). The formatting of CSV is very finicky in ushahidi, so I am digging around for a HOWTO on this. I'll probably write my own on my blog once I figure it out - since the docs are absent for this



#12

Noted. Configurable auto approval.



#13

Note: This doesn't work if the incident is being reported via the API.



#14

For auto-approve when reporting via API the file

Code:
application/libraries/api/MY_Report_Api_Object.php
has to be modified as
Code:
report.php
by adding:
Code:

$incident->incident_active = 1;

before

Code:

$incident->save() = 1;