Bug 404451

Summary: sncf confirmation email types to help development
Product: [Applications] KDE Itinerary Reporter: Philippe ROUBACH <philippe.roubach>
Component: generalAssignee: Volker Krause <vkrause>
Status: REOPENED ---    
Severity: normal CC: philippe.roubach
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: sncf confirmation email
sncf TER confirmation email
another TER confirmation mail, same as the first except date
OUIGO sncf confirmation mail
ouigo, bordeaux-paris,mail, ticket is now available
Confirmation pour votre voyage CAUDERAN MERIGNAC - ARCACHON, aller le 08 sept., retour le 08 sept.
confirmation mail of "La fourchette" android app
ouigo confirmation mail
ouigo ticket mail
ouigo reminding mail
SNCF TER confirmation mail from site www.ter.sncf.com/nouvelle-aquitaine
SNCf mixed travel ouigo and inoui
25/6/2020, Bordeaux<->Paris INOUI, no coach, deck, place
A new SNCF TER confirmation mail which kitinerary does not take care at all.
a new SNCF OUI confirmation mail that kitinerary does not take care
a new SNCF ter confirmation by the app "SNCF" that kitinerary does not take care
a new confirmation mail from sncf connect that kitinerary does not take care.
sncf connect tgv cpnfirmation mail
sncf connect TER confirmation mail

Description Philippe ROUBACH 2019-02-16 18:16:15 UTC
Created attachment 118140 [details]
sncf confirmation email

SUMMARY

kmail plugin is not compliant with SNCF (french railway company) confirmation email

STEPS TO REPRODUCE
1. view a confirmation sncf email in kmail
2. right click anywhere in mail
3. 

OBSERVED RESULT

no itinerary contextual menu

i join a sncf confirmation email

EXPECTED RESULT

an itinerary contextual menu is displayed

SOFTWARE/OS VERSIONS
Windows: 
MacOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.15.0
KDE Frameworks Version: 5.55.0
Qt Version: 5.12.1

ADDITIONAL INFORMATION
kontact 5.10.2
itinerary 18.12.2
Comment 1 Volker Krause 2019-03-09 13:13:10 UTC
Git commit 3223fc1209ca6e06f6bdc34ba6858213e7287dd2 by Volker Krause.
Committed on 09/03/2019 at 13:12.
Pushed by vkrause into branch 'master'.

Support SNCF confirmation emails too

M  +48   -1    src/extractors/sncf.js
M  +6    -0    src/extractors/sncf.json

https://commits.kde.org/kitinerary/3223fc1209ca6e06f6bdc34ba6858213e7287dd2
Comment 2 Philippe ROUBACH 2019-03-09 13:42:41 UTC
thanks

can we expect this fix in kde app 18.12.3 ?
Comment 3 Christoph Feck 2019-03-09 14:38:14 UTC
No, KDE Applications 18.12.3 were already released on 7th.
Comment 4 Philippe ROUBACH 2019-05-12 07:55:45 UTC
Created attachment 119994 [details]
sncf TER confirmation email

it is compliant with "TGV" confirmation see "sncf confirmation email"

it is not compliant with a "TER" confirmation email. see "sncf TER confirmation email"
Comment 5 Philippe ROUBACH 2019-05-12 08:08:01 UTC
i forget this

Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.15.5
KDE Frameworks Version: 5.57.0
Qt Version: 5.12.3

ADDITIONAL INFORMATION
kontact 5.11.1
itinerary 19.04.1
Comment 6 Volker Krause 2019-05-12 09:28:09 UTC
Git commit ac3f622b157a9a395898d231ff4dcf9a3ce8293f by Volker Krause.
Committed on 12/05/2019 at 09:17.
Pushed by vkrause into branch 'Applications/19.04'.

PNR is optional in SNCF booking confirmations

Non-TGV tickets don't have that, so don't fail if it's not present.

M  +4    -2    src/extractors/sncf.js

https://commits.kde.org/kitinerary/ac3f622b157a9a395898d231ff4dcf9a3ce8293f
Comment 7 Philippe ROUBACH 2019-05-12 09:31:34 UTC
thanks
Comment 8 Philippe ROUBACH 2019-05-17 17:05:20 UTC
since update of kde app 19.04.1 and to kde frameworks 5.58

itinerary works no more with kmail neither with a tgv confirmation nor a TER confirmation.
Comment 9 Philippe ROUBACH 2019-05-18 05:47:32 UTC
i made an error for tgv confirmation it's ok.

for TER confirmation it's not ok.
Comment 10 Philippe ROUBACH 2019-05-18 05:50:55 UTC
Created attachment 120151 [details]
another TER confirmation mail, same as the first except date
Comment 11 Volker Krause 2019-05-19 08:12:14 UTC
The fix for TER bookings didn't make it into 19.04.1, that was already tagged at the time of that change, sorry for not making that explicit. So 19.04.1 will have the same issue, only 19.04.2 or newer work.

Here's the extractor result of your latest test case as proof ;-)

[
    {
        "@context": "http://schema.org",
        "@type": "TrainReservation",
        "reservationFor": {
            "@type": "TrainTrip",
            "arrivalStation": {
                "@type": "TrainStation",
                "name": "PESSAC"
            },
            "arrivalTime": "2019-05-18T09:13:00",
            "departureDay": "2019-05-18",
            "departureStation": {
                "@type": "TrainStation",
                "name": "CAUDERAN MERIGNAC"
            },
            "departureTime": "2019-05-18T09:06:00",
            "trainName": "TER",
            "trainNumber": "866178"
        }
    },
    {
        "@context": "http://schema.org",
        "@type": "TrainReservation",
        "reservationFor": {
            "@type": "TrainTrip",
            "arrivalStation": {
                "@type": "TrainStation",
                "name": "ARCACHON"
            },
            "arrivalTime": "2019-05-18T10:28:00",
            "departureDay": "2019-05-18",
            "departureStation": {
                "@type": "TrainStation",
                "name": "PESSAC"
            },
            "departureTime": "2019-05-18T09:41:00",
            "trainName": "TER",
            "trainNumber": "866315"
        }
    },
    {
        "@context": "http://schema.org",
        "@type": "TrainReservation",
        "reservationFor": {
            "@type": "TrainTrip",
            "arrivalStation": {
                "@type": "TrainStation",
                "name": "PESSAC"
            },
            "arrivalTime": "2019-05-18T17:18:00",
            "departureDay": "2019-05-18",
            "departureStation": {
                "@type": "TrainStation",
                "name": "ARCACHON"
            },
            "departureTime": "2019-05-18T16:33:00",
            "trainName": "TER",
            "trainNumber": "866346"
        }
    },
    {
        "@context": "http://schema.org",
        "@type": "TrainReservation",
        "reservationFor": {
            "@type": "TrainTrip",
            "arrivalStation": {
                "@type": "TrainStation",
                "name": "CAUDERAN MERIGNAC"
            },
            "arrivalTime": "2019-05-18T18:07:00",
            "departureDay": "2019-05-18",
            "departureStation": {
                "@type": "TrainStation",
                "name": "PESSAC"
            },
            "departureTime": "2019-05-18T18:01:00",
            "trainName": "TER",
            "trainNumber": "866193"
        }
    }
]
Comment 12 Philippe ROUBACH 2019-06-11 13:56:36 UTC
Created attachment 120788 [details]
OUIGO sncf confirmation mail

itinerary not compliant with OUIGO sncf confirmation mail
Comment 13 Volker Krause 2019-06-16 08:05:06 UTC
Thank you! The entire OUIGO booking workflow is indeed not supported yet (this is the first sample we got for it).
Comment 14 Philippe ROUBACH 2019-07-27 07:44:43 UTC
Created attachment 121767 [details]
ouigo, bordeaux-paris,mail, ticket is now available

OUIGO ticket

this is not a confirmation mail but a mail to notify that the ticket is now available for android app or for printing.
Comment 15 Philippe ROUBACH 2019-09-09 06:57:04 UTC
Created attachment 122554 [details]
Confirmation pour votre voyage CAUDERAN MERIGNAC - ARCACHON, aller le 08 sept., retour le 08 sept.

Itinerary decodes no more SNCF TER confirmation mail.
Comment 16 Philippe ROUBACH 2019-09-09 06:59:36 UTC
(In reply to Philippe ROUBACH from comment #15)
> Created attachment 122554 [details]
> Confirmation pour votre voyage CAUDERAN MERIGNAC - ARCACHON, aller le 08
> sept., retour le 08 sept.
> 
> Itinerary decodes no more SNCF TER confirmation mail.

i forgot:

SOFTWARE/OS VERSIONS
Windows: 
MacOS: 
Linux/KDE Plasma: openSuse leap 15.41
(available in About System)
KDE Plasma Version: 5.16.5.0
KDE Frameworks Version: 5.61.0
Qt Version: 5.13.1

ADDITIONAL INFORMATION
kontact 5.12.1
itinerary 19.08.1
Comment 17 Volker Krause 2019-09-19 17:03:41 UTC
Git commit 1bec3fd915adfc63c55d9b9e478718b6aaaa23fd by Volker Krause.
Committed on 19/09/2019 at 17:03.
Pushed by vkrause into branch 'Applications/19.08'.

Fix date parsing in SNCF confirmation emails

M  +2    -2    src/extractors/sncf.js

https://commits.kde.org/kitinerary/1bec3fd915adfc63c55d9b9e478718b6aaaa23fd
Comment 18 Philippe ROUBACH 2019-10-11 14:21:09 UTC
Created attachment 123144 [details]
confirmation mail of "La fourchette" android app

I am not sure itinerary takes care of this sort of mail. But when I saw the itinerary part in this mail I found it is very handy. Perhaps an enhancement ?


All runs well but not for adding this event "a restaurant reservation"

The beginning is good "12 h" but the end is not good "23 h 59". It must be "14 h"

https://play.google.com/store/apps/details?id=com.lafourchette.lafourchette
Comment 19 Volker Krause 2019-10-13 09:34:01 UTC
Interesting! This seems to show up correctly here in KMail and in KDE Itinerary, however I don't see the end time shown anywhere (and there is none specified in the email). Where did it show 23h59 for you?

[
    {
        "@context": "http://schema.org",
        "@type": "FoodEstablishmentReservation",
        "partySize": 2,
        "reservationFor": {
            "@type": "FoodEstablishment",
            "address": {
                "@type": "PostalAddress",
                "addressCountry": "FR",
                "addressLocality": "Bordeaux",
                "postalCode": "33300",
                "streetAddress": "8 Quai de Bacalan"
            },
            "name": "La Brasserie des Chartrons"
        },
        "reservationNumber": "2124052552",
        "startTime": {
            "@type": "QDateTime",
            "@value": "2019-10-15T12:00:00+02:00",
            "timezone": "Europe/Paris"
        },
        "underName": {
            "@type": "Person",
            "name": "Philippe ROUBACH"
        }
    }
]
Comment 20 Philippe ROUBACH 2019-10-13 10:29:45 UTC
a hypothesis:

when you reserve a restaurant you reserve for an hour not a duration then there is no duration.

but when you create an event in calendar you need a beginning and an ending.

when itinerary ask for korganiser to add an event itinerary does not supply an ending

then by default in this case korganizer set the ending at "23 h 59 mn"
Comment 21 Philippe ROUBACH 2019-10-13 10:31:52 UTC
For this kind of confirmation mail itinerary must supply ending = beginning + 2 h.

"2 h" is realistic for a dinner. No ?
Comment 22 Volker Krause 2019-10-13 10:40:56 UTC
Oh, I see, this happens when adding it to the calendar, I can reproduce now. Yes, 2h when no end time is given makes sense, I'll fix that.
Comment 23 Volker Krause 2019-10-13 10:47:42 UTC
Git commit 7e0e66911e642a82b8807022926d24996479fc19 by Volker Krause.
Committed on 13/10/2019 at 10:47.
Pushed by vkrause into branch 'Applications/19.08'.

Better end time default for restaurant reservations without an end time

M  +1    -1    src/calendarhandler.cpp

https://commits.kde.org/kitinerary/7e0e66911e642a82b8807022926d24996479fc19
Comment 24 Philippe ROUBACH 2019-10-13 14:09:30 UTC
thanks
Comment 25 Philippe ROUBACH 2020-02-02 09:56:30 UTC
when you buy a journey of "OUIGO" type at www.ouigo.com or with "ouigo" app
you get 3 mails:

- the day of your purchase, an order confirmation mail with only day, hours and train

- some days after, a ticket mail with pdf printable ticket with day, hours, train, car, deck ("salle haute", "salle basse"), seat, qr code

- 3 or 4 days before departure, a reminding mail, with day, hours, train, car, deck, seat, a detailed description of the journey

Today kde itinerary takes care with only "order confirmation mail", the less informative one.

It would be better to take care of the ticket mail or the reminding mail because if I add an event in my calendar I would like the most informative event.

I join the 3 mails : confirmation, ticket, reminder.




SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.17.5
KDE Frameworks Version: 5.66.0
Qt Version: 5.14.0

ADDITIONAL INFORMATION

kde apps 19.12.1

thanks
Comment 26 Philippe ROUBACH 2020-02-02 09:57:28 UTC
Created attachment 125608 [details]
ouigo confirmation mail
Comment 27 Philippe ROUBACH 2020-02-02 09:58:20 UTC
Created attachment 125609 [details]
ouigo ticket mail
Comment 28 Philippe ROUBACH 2020-02-02 10:00:35 UTC
Created attachment 125610 [details]
ouigo reminding mail
Comment 29 Philippe ROUBACH 2020-02-16 17:14:27 UTC
Created attachment 126080 [details]
SNCF TER confirmation mail from site www.ter.sncf.com/nouvelle-aquitaine

SNCF TER confirmation mail for a journey bought at site www.ter.sncf.com/nouvelle-aquitaine
Comment 30 Philippe ROUBACH 2020-02-17 11:28:47 UTC
Created attachment 126101 [details]
SNCf mixed travel ouigo and inoui

My travel :

Bordeaux - Paris by OUIGO
Paris - Bordeaux by INOUI

if I add my travel in my calendar
then
for Paris - Bordeaux by INOUI

Car number, Place number, Deck (Salle) top or bottom are not recorded in the event.

Thanks
Comment 31 Volker Krause 2020-02-19 17:46:48 UTC
Git commit 4b58675a4694136ffca0ed6e2f88846d38f4d592 by Volker Krause.
Committed on 19/02/2020 at 17:46.
Pushed by vkrause into branch 'master'.

Add initial support for Ouigo tickets

M  +23   -1    src/extractors/sncf.js
M  +41   -10   src/extractors/sncf.json

https://commits.kde.org/kitinerary/4b58675a4694136ffca0ed6e2f88846d38f4d592
Comment 32 Volker Krause 2020-02-27 17:58:48 UTC
Git commit a092e5fc49c4058aafbfe52d1dad294f813954b4 by Volker Krause.
Committed on 27/02/2020 at 17:51.
Pushed by vkrause into branch 'master'.

Correctly distinguish between SNCF and Ouigo PNRs

In a mixed ticket, you can have two different PNRs, picking the wrong one
will later break merging with the Ouigo ticket.

Also, extract the passenger name while we are at it.

M  +15   -7    src/extractors/sncf.js

https://commits.kde.org/kitinerary/a092e5fc49c4058aafbfe52d1dad294f813954b4
Comment 33 Philippe ROUBACH 2020-06-14 10:06:40 UTC
Created attachment 129339 [details]
25/6/2020, Bordeaux<->Paris INOUI, no coach, deck, place
Comment 34 Philippe ROUBACH 2020-06-14 10:10:16 UTC
(In reply to Philippe ROUBACH from comment #30)
> Created attachment 126101 [details]
> SNCf mixed travel ouigo and inoui
> 
> My travel :
> 
> Bordeaux - Paris by OUIGO
> Paris - Bordeaux by INOUI
> 
> if I add my travel in my calendar
> then
> for Paris - Bordeaux by INOUI
> 
> Car number, Place number, Deck (Salle) top or bottom are not recorded in the
> event.
> 
> Thanks

Problem still there. see 25/6/2020, Bordeaux<->Paris INOUI, no coach, deck, place confirmation mail.

Kde apps 20.04.2
kde plasma 5.19.0
kde frameworks 5.71.0
Comment 35 Philippe ROUBACH 2020-06-14 10:13:40 UTC
Created attachment 129340 [details]
A new SNCF TER confirmation mail which kitinerary does not take care at all.
Comment 36 Volker Krause 2020-06-17 15:06:49 UTC
Git commit bc8b78d47829da0bec4facdff3bf1a740751e5ae by Volker Krause.
Committed on 17/06/2020 at 15:06.
Pushed by vkrause into branch 'release/20.04'.

Extract seat reservation information from Ouigo confirmations

M  +7    -0    src/extractors/sncf.js

https://invent.kde.org/pim/kitinerary/commit/bc8b78d47829da0bec4facdff3bf1a740751e5ae
Comment 37 Philippe ROUBACH 2020-07-19 10:22:13 UTC
Created attachment 130236 [details]
a new SNCF OUI confirmation mail that kitinerary does not take care

a new SNCF OUI confirmation mail that kitinerary does not take care
Comment 38 Philippe ROUBACH 2021-05-03 11:08:58 UTC
Created attachment 138115 [details]
a new SNCF ter confirmation by the app "SNCF" that kitinerary does not take care
Comment 39 Volker Krause 2021-07-14 15:20:39 UTC
Git commit 8148a47d53dacf47de80f5b4d603e2c68ae3f095 by Volker Krause.
Committed on 14/07/2021 at 15:18.
Pushed by vkrause into branch 'release/21.08'.

Handle SNCF TER booking confirmations
Related: bug 439055
FIXED-IN: 21.08.0

M  +21   -0    src/lib/scripts/sncf.js
M  +33   -13   src/lib/scripts/sncf.json

https://invent.kde.org/pim/kitinerary/commit/8148a47d53dacf47de80f5b4d603e2c68ae3f095
Comment 40 Philippe ROUBACH 2022-02-21 16:29:14 UTC
Created attachment 147005 [details]
a new confirmation mail from sncf connect that kitinerary does not take care.
Comment 41 Volker Krause 2022-02-22 17:16:12 UTC
Thank you! This one doesn't seem to have the complete plan in the email though, right? Ie. this is a retour ticket with each direction involving two TER trains, but only the departure time of the first leg is specified, all other times as well as the station on which to change trains are missing if I read this correctly?
Comment 42 Philippe ROUBACH 2022-02-22 18:19:41 UTC
Yes it is right. It is not a complete document.

But it is sufficient to create an event for the go and an event for the return. no ?
Comment 43 Volker Krause 2022-02-23 17:00:48 UTC
Right, it's probably not good enough for the app at this point, but for a calendar entry we should be able to work with the incomplete data as well.
Comment 44 Philippe ROUBACH 2022-06-18 09:49:00 UTC
Created attachment 149881 [details]
sncf connect tgv cpnfirmation mail

new sncf connect tgv confirmation mail
Comment 45 Philippe ROUBACH 2022-06-18 09:51:53 UTC
Created attachment 149883 [details]
sncf connect TER confirmation mail

new sncf connect TER confirmation mail
Comment 46 Volker Krause 2022-06-22 16:25:30 UTC
Git commit 73e4195dacae2665503b59a167514c4684ee0b2b by Volker Krause.
Committed on 22/06/2022 at 16:14.
Pushed by vkrause into branch 'master'.

Extend trigger pattern for connect.sncf emails

M  +6    -0    src/lib/scripts/sncf.json

https://invent.kde.org/pim/kitinerary/commit/73e4195dacae2665503b59a167514c4684ee0b2b