Merge lp:~gary-wzl77/ubuntu-calendar-app/add_prefix into lp:ubuntu-calendar-app

Proposed by Gary.Wang
Status: Merged
Approved by: Nicholas Skaggs
Approved revision: 754
Merged at revision: 756
Proposed branch: lp:~gary-wzl77/ubuntu-calendar-app/add_prefix
Merge into: lp:ubuntu-calendar-app
Diff against target: 66 lines (+21/-4)
1 file modified
calendar.qml (+21/-4)
To merge this branch: bzr merge lp:~gary-wzl77/ubuntu-calendar-app/add_prefix
Reviewer Review Type Date Requested Status
Jenkins Bot continuous-integration Approve
Kunal Parmar Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Needs Fixing
Nicholas Skaggs Pending
Mihir Soni Pending
Alan Pope 🍺🐧🐱 πŸ¦„ Pending
Review via email: mp+267317@code.launchpad.net

Commit message

Add prefix for event id parsing.

Description of the change

Add prefix for event id parsing.

For Bug #1474361,
Lost prefix for event id parsing results in calendar can't navigate to event details page.
If the dispatch url in event scope is "calendar:///qtorganizer:eds::system-calendar/eventId=%1", it's invalid.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ethan Chang (ethan.chang) wrote :

Test Result:
1. If Calendar app not opened
Tap Event and click open , it will open the calendar app but doesn't navigate to detail page

2. If Calendar app is opened
Tap Event and click open , it will navigate to detail page

Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

@gary Is this still blocked on a fix in unity-scope_event?

Revision history for this message
Gary.Wang (gary-wzl77) wrote :

@Alan There is no need to make code change on unity-scope_event.
 I fix failed test case 2 that Ethan mentioned above in Revno: 719. Please review.
 Thanks.

Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Kunal Parmar (pkunal-parmar) wrote :

looks fine to me

review: Approve
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
https://core-apps-jenkins.ubuntu.com/job/run-ap-tests-autolanding/11/
Executed test runs:
    None: https://core-apps-jenkins.ubuntu.com/job/generic-land-mp/1411/console

review: Needs Fixing (continuous-integration)
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Gary.Wang (gary-wzl77) wrote :

Looks like Jenkins issue:
DEBUG: jenkins job parameter [use_description_for_commit]: not found
....

744. By Launchpad Translations on behalf of ubuntu-calendar-dev

Launchpad automatic translations update.

745. By Launchpad Translations on behalf of ubuntu-calendar-dev

Launchpad automatic translations update.

746. By Launchpad Translations on behalf of ubuntu-calendar-dev

Launchpad automatic translations update.

747. By Kunal Parmar

Build upon lp:~pkunal-parmar/ubuntu-calendar-app/Uitk1_3 by reducing the font size in headers.

Approved by Jenkins Bot, Dan Chapman ξƒΏ.

748. By Evan McIntire

Fix a small typo in the readme (calendaar -> calendar).

Approved by Jenkins Bot, Niklas Wenzel, Alan Pope ξƒΏ.

749. By Launchpad Translations on behalf of ubuntu-calendar-dev

Launchpad automatic translations update.

750. By Launchpad Translations on behalf of ubuntu-calendar-dev

Launchpad automatic translations update.

751. By Renato Araujo Oliveira Filho

Update to qtquick 2.4.

Approved by Jenkins Bot, Alan Pope ξƒΏ.

752. By Renato Araujo Oliveira Filho

Simplify Tab loading, declaring individual components for each tab.
Make sure that year view is not loaded on app startup without request.

Approved by Jenkins Bot, Alan Pope ξƒΏ.

753. By Kunal Parmar

resolves Bug #1476032. Fixes: https://bugs.launchpad.net/bugs/1369543, https://bugs.launchpad.net/bugs/1476032.

Approved by Jenkins Bot.

754. By Gary.Wang

Merge from trunk and optimized on argument query

Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'calendar.qml'
2--- calendar.qml 2016-02-02 01:55:55 +0000
3+++ calendar.qml 2016-02-03 08:08:26 +0000
4@@ -100,12 +100,17 @@
5 target: UriHandler
6 onOpened: {
7 var uri = uris[0]
8- if(uri !== undefined && url != "") {
9+ if(uri !== undefined && uri !== "") {
10 var commands = uri.split("://")[1].split("=");
11 if(commands[0].toLowerCase() === "eventid") {
12 // calendar://eventid=??
13 if( eventModel ) {
14- eventModel.showEventFromId(commands[1]);
15+ var eventId = commands[1];
16+ var prefix = "qtorganizer:eds::system-calendar/";
17+ if (eventId.indexOf(prefix) < 0)
18+ eventId = prefix + eventId;
19+
20+ eventModel.showEventFromId(eventId);
21 }
22 }
23 }
24@@ -243,6 +248,7 @@
25 property bool newevent: false;
26 property int starttime: -1;
27 property int endtime: -1;
28+ property string eventId;
29
30 //WORKAROUND: The new header api does not work with tabs check bug: #1539759
31 property list<Action> tabsAction: [
32@@ -337,14 +343,18 @@
33 var newevenpattern= new RegExp ("newevent");
34 var starttimepattern = new RegExp ("starttime=\\d+");
35 var endtimepattern = new RegExp ("endtime=\\d+");
36+ var eventIdpattern = new RegExp ("eventId=.*")
37
38 newevent = newevenpattern.test(url);
39
40 if (starttimepattern.test(url))
41- starttime = url.match(/starttime=(\d+)/)[0].replace("starttime=", '');
42+ starttime = url.match(/starttime=(\d+)/)[1];
43
44 if (endtimepattern.test(url))
45- endtime = url.match(/endtime=(\d+)/)[0].replace("endtime=", '');
46+ endtime = url.match(/endtime=(\d+)/)[1];
47+
48+ if (eventIdpattern.test(url))
49+ eventId = url.match(/eventId=(.*)/)[1];
50 }
51
52 Component.onCompleted: {
53@@ -370,6 +380,13 @@
54 tabs.selectedTabIndex = dayTab.index;
55 }
56 } // End of else if (starttime)
57+ else if (eventId !== "") {
58+ var prefix = "qtorganizer:eds::system-calendar/";
59+ if (eventId.indexOf(prefix) < 0)
60+ eventId = prefix + eventId;
61+
62+ eventModel.showEventFromId(eventId);
63+ }
64 else {
65 // Due to bug #1231558 {if (args.defaultArgument.at(0))} is always true
66 // After the fix we can delete this else

Subscribers

People subscribed via source and target branches

to status/vote changes: