Data at Your Fingertips: Explore Our New Reporting and Statistical Capabilities By Ryan Ashbrook 23 hours ago
NAWAC Posted January 18 Share Posted January 18 (edited) We run statistics on poll data on our site. I am GETting the poll data on topics via an API call. I notice that the only poll sent back from the API is something similar to the following (as an example): [poll] => Array ( [id] => 255 [title] => Cast your vote [votes] => 8 [questions] => Array ( [0] => Array ( [question] => Cast your vote, either Yes or No. [options] => Array ( [Yes] => 5 [No] => 3 ) ) ) ) It would be nice if the other poll data was also sent back. Example, like the pole_closed field (from the core_polls table). It would be nice to know if the value of the pole_closed field is either set to "0" or "1". It would also be nice to even include the value of the poll_close_date. It could look something like: [poll] => Array ( [id] => 255 [closed] => 1 [close_date] => 2023-01-08 08:30:00 [title] => Cast your vote [votes] => 8 [questions] => Array ( [0] => Array ( [question] => Cast your vote, either Yes or No. [options] => Array ( [Yes] => 5 [No] => 3 ) ) ) ) Thanks. Edited January 18 by NAWAC Link to comment Share on other sites More sharing options...
Stuart Silvester Posted January 19 Share Posted January 19 Yes, I think we should be able to do that. It feels like more of an oversight than a feature. NAWAC 1 Link to comment Share on other sites More sharing options...
Marc Stridgen Posted March 10 Share Posted March 10 Just a quick update to let you know that was added in the recent 4.7.8 release of our platform. Please upgrade your site to resolve this issue. NAWAC 1 Link to comment Share on other sites More sharing options...
NAWAC Posted April 10 Author Share Posted April 10 (edited) On 3/10/2023 at 2:15 AM, Marc Stridgen said: Just a quick update to let you know that was added in the recent 4.7.8 release of our platform. Please upgrade your site to resolve this issue. I've noticed that when GETting the topic information via an API call, if the poll is closed (i.e. [closed] => 1) the poll data (topic) is not returned in the call (nothing is returned). Even if the poll is closed, the API call should still return poll data from topic. However, if the poll is still open (i.e., [closed] => ), the API call returns poll data back to the calling script just fine. Edited April 10 by NAWAC Link to comment Share on other sites More sharing options...
Daniel F Posted April 14 Share Posted April 14 On 4/10/2023 at 6:41 PM, NAWAC said: I've noticed that when GETting the topic information via an API call, if the poll is closed (i.e. [closed] => 1) the poll data (topic) is not returned in the call (nothing is returned). Even if the poll is closed, the API call should still return poll data from topic. However, if the poll is still open (i.e., [closed] => ), the API call returns poll data back to the calling script just fine. Thanks, I have logged this in our bugtracker. Link to comment Share on other sites More sharing options...
Andy Millne Posted yesterday at 09:06 AM Share Posted yesterday at 09:06 AM We're not actually able to reproduce this. Could you please provide more info on the specific API request you are making and the output you see? In testing, the poll data is always included whether the poll is closed or open. SeNioR- 1 Link to comment Share on other sites More sharing options...
Recommended Posts