Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted January 18, 20232 yr 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, 20232 yr by NAWAC
January 19, 20232 yr Yes, I think we should be able to do that. It feels like more of an oversight than a feature.
March 10, 20231 yr 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.
April 10, 20231 yr Author 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, 20231 yr by NAWAC
April 14, 20231 yr 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.
June 6, 20231 yr 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.