Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.3.0: wrong date order #861

Closed
g6094199 opened this issue Mar 5, 2020 · 5 comments · Fixed by #877
Closed

1.3.0: wrong date order #861

g6094199 opened this issue Mar 5, 2020 · 5 comments · Fixed by #877
Assignees
Milestone

Comments

@g6094199
Copy link

g6094199 commented Mar 5, 2020

What is going wrong?

Describe the bug
There is a wrong date order

To Reproduce
Steps to reproduce the behavior:
-create a poll
-release the poll to the public
-user vote-
-add another date (duplicated date with different time)-> dates get added in wrong order

Expected behavior
Even when added after the release of the pool additional dates should be ordered in the right way

Screenshots
Bildschirmfoto vom 2020-03-05 12-10-44

Information about your polls installation

Polls version?
1.3.0

Fresh installation or update from a prior version (from which one)?

How did you install this version?(Appstore or describe installation)

Information about your Instance of Nextcloud/ownCloud

Nextcloud

Nextcloud/ownCloud version: 18

@dartcafe
Copy link
Collaborator

dartcafe commented Mar 5, 2020

I have no idea, how this could happen. Dates are ordered on their timestamp.
Can you post the content of the oc_polls_options table with the poll_id of this poll?

@g6094199
Copy link
Author

g6094199 commented Mar 5, 2020

| 194 | 23 | 2020-04-12 10:00:00 | 1586685600 | 1586080800 |
| 195 | 23 | 2020-04-19 10:00:00 | 1587290400 | 1586685600 |
| 196 | 23 | 2020-04-26 10:00:00 | 1587895200 | 1587290400 |
| 198 | 23 | 2020-04-20 10:00:00 | 1587376800 | 1586772000 |
| 199 | 23 | 2020-04-05 10:00:00 | 1586080800 | 1586080800 |
| 200 | 23 | 2020-04-12 16:00:00 | 1586707200 | 1586707200 |
| 201 | 23 | 2020-04-19 16:00:00 | 1587312000 | 1587312000 |
| 202 | 23 | 2020-04-26 16:00:00 | 1587916800 | 1587916800 |
| 203 | 23 | 2020-04-05 16:00:00 | 1586102400 | 1586102400 |
+-----+---------+---------------------+------------+------------+

@dartcafe
Copy link
Collaborator

dartcafe commented Mar 6, 2020

Did you create the poll with a version before 1.3 and add the new options after the update?

@g6094199
Copy link
Author

g6094199 commented Mar 6, 2020

yes!

@ctueck
Copy link

ctueck commented Apr 3, 2020

The same happened to me, same NextCloud and Polls app version as @g6094199 .

Only difference here: I did not create the poll in an older version, but everything was under version 1.3.0.

The obvious workaround fixed it easily, though:

update `[prefix]_polls_options` set `order` = `timestamp` where `poll_id`= [poll ID]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants