[akregator] [Bug 437190] New: Wrong order for entries with the same date

Daniel Roschka bugzilla_noreply at kde.org
Sun May 16 09:18:13 BST 2021


https://bugs.kde.org/show_bug.cgi?id=437190

            Bug ID: 437190
           Summary: Wrong order for entries with the same date
           Product: akregator
           Version: unspecified
          Platform: Debian unstable
                OS: Linux
            Status: REPORTED
          Severity: minor
          Priority: NOR
         Component: general
          Assignee: kdepim-bugs at kde.org
          Reporter: danielroschka at phoenitydawn.de
  Target Milestone: ---

Created attachment 138475
  --> https://bugs.kde.org/attachment.cgi?id=138475&action=edit
Screenshot showing the wrong order in Akregator

SUMMARY

When fetching a feed which contains multiple entries with the same date and
which contains new entries on consecutive fetches (but still with the same
date), the entries are ordered incorrectly in Akregator when ordering by date.

STEPS TO REPRODUCE
1. Create a file (e.g. /tmp/wrong_date.xml) with the following content:

<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Wrong order for
same dates</title><link href="https://example.tld"
rel="alternate"></link><id>https://example.tld</id><updated>2021-05-16T00:00:00+02:00</updated><entry><title>Entry
1 from first fetch</title><link href="https://example.tld/1/"
rel="alternate"></link><published>2021-05-16T00:00:00+02:00</published><updated>2021-05-16T00:00:00+02:00</updated><id>11</id><summary
type="html">-</summary></entry><entry><title>Entry 2 from first
fetch</title><link href="https://example.tld/2/"
rel="alternate"></link><published>2021-05-16T00:00:00+02:00</published><updated>2021-05-16T00:00:00+02:00</updated><id>12</id><summary
type="html">-</summary></entry><entry><title>Entry 3 from first
fetch</title><link href="https://example.tld/3/"
rel="alternate"></link><published>2021-05-16T00:00:00+02:00</published><updated>2021-05-16T00:00:00+02:00</updated><id>13</id><summary
type="html">-</summary></entry><entry><title>Entry 4 from first
fetch</title><link href="https://example.tld/4/"
rel="alternate"></link><published>2021-05-16T00:00:00+02:00</published><updated>2021-05-16T00:00:00+02:00</updated><id>14</id><summary
type="html">-</summary></entry></feed>

2. Subscribe to a new feed in Akregator, using the stored file as source
(file:///tmp/wrong_date.xml)
3. Fetch the feed in Akregator.
4. Replace the content of the file with the following content:

<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Wrong order for
same dates</title><link href="https://example.tld"
rel="alternate"></link><id>https://example.tld</id><updated>2021-05-16T00:00:00+02:00</updated><entry><title>Entry
1 from second fetch</title><link href="https://example.tld/1/"
rel="alternate"></link><published>2021-05-16T00:00:00+02:00</published><updated>2021-05-16T00:00:00+02:00</updated><id>21</id><summary
type="html">-</summary></entry><entry><title>Entry 2 from second
fetch</title><link href="https://example.tld/2/"
rel="alternate"></link><published>2021-05-16T00:00:00+02:00</published><updated>2021-05-16T00:00:00+02:00</updated><id>22</id><summary
type="html">-</summary></entry><entry><title>Entry 3 from second
fetch</title><link href="https://example.tld/3/"
rel="alternate"></link><published>2021-05-16T00:00:00+02:00</published><updated>2021-05-16T00:00:00+02:00</updated><id>23</id><summary
type="html">-</summary></entry><entry><title>Entry 4 from second
fetch</title><link href="https://example.tld/4/"
rel="alternate"></link><published>2021-05-16T00:00:00+02:00</published><updated>2021-05-16T00:00:00+02:00</updated><id>24</id><summary
type="html">-</summary></entry></feed>

5. Fetch the feed in Akregator again.
6. Replace the content of the file with the following content once again:

<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Wrong order for
same dates</title><link href="https://example.tld"
rel="alternate"></link><id>https://example.tld</id><updated>2021-05-16T00:00:00+02:00</updated><entry><title>Entry
1 from third fetch</title><link href="https://example.tld/1/"
rel="alternate"></link><published>2021-05-16T00:00:00+02:00</published><updated>2021-05-16T00:00:00+02:00</updated><id>31</id><summary
type="html">-</summary></entry><entry><title>Entry 2 from third
fetch</title><link href="https://example.tld/2/"
rel="alternate"></link><published>2021-05-16T00:00:00+02:00</published><updated>2021-05-16T00:00:00+02:00</updated><id>32</id><summary
type="html">-</summary></entry><entry><title>Entry 3 from third
fetch</title><link href="https://example.tld/3/"
rel="alternate"></link><published>2021-05-16T00:00:00+02:00</published><updated>2021-05-16T00:00:00+02:00</updated><id>33</id><summary
type="html">-</summary></entry><entry><title>Entry 4 from third
fetch</title><link href="https://example.tld/4/"
rel="alternate"></link><published>2021-05-16T00:00:00+02:00</published><updated>2021-05-16T00:00:00+02:00</updated><id>34</id><summary
type="html">-</summary></entry></feed>

7. Fetch the feed in Akregator again.

OBSERVED RESULT

When sorting by date, the entries are sorted with the following order:

Entry 1 from first fetch
Entry 1 from second fetch
Entry 1 from third fetch
Entry 2 from first fetch
Entry 2 from second fetch
Entry 2 from third fetch
Entry 3 from first fetch
Entry 3 from second fetch
Entry 3 from third fetch

Please note that the titles of the entries are not the reason for this sort
order. This happens with arbitrary titles as well.

I've also attached a screenshot showing how this looks in Akregator.

EXPECTED RESULT

I'd expect entries with the same date from different fetches to be sorted by
the time of fetching:

Entry 1 from third fetch
Entry 2 from third fetch
Entry 3 from third fetch
Entry 1 from second fetch
Entry 2 from second fetch
Entry 3 from second fetch
Entry 1 from first fetch
Entry 2 from first fetch
Entry 3 from first fetch


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
Akregator version: 5.15.3
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION

There is also another unrelated bug shown in the screenshot. Akregator
sometimes seems to have some kind of off-by-one error when the publishing date
of an entry is exactly at midnight.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Kdepim-bugs mailing list