Automatically Approving a report / incidnet


#1

I'd like to automatically approve an incident after I submit it to the database via the API. According to the documentation, I have to repeat all the information, including the location_id. Is this an error in the documentation, or is that really necessary?


What I'd like to do is simply add the fields when I'm creating the report:


incident_active - Required. Approve the report or not. The value is either 1 for approval or 0 to unapprove.

incident_verified - Required. Verify the report or not. The value is either 1 for verify or 0 for unverify.


but if I have to edit, wouldn't it make more sense to simply pass in the incident ID and just the fields I wanted to change, rather than repeating the whole record?


Am I missing something? I have another system with reports that have been approved, and I'm trying to use the API rather than writing to the database directly. Any pointers?


Thx,


Tac



#2

HI Tac, at Random Hacks of Kindness some of this type of code was written. (The link is lost on me at the moment.). We are, however, collecting this type of feature request for Ushahidi 3.0 on the wiki

 

Other resources:

more on github

our wiki

Contact us

heather