From 3d9260894574a3f94a7add8b7f344e509c869e63 Mon Sep 17 00:00:00 2001 From: Paito Anderson Date: Tue, 13 May 2014 22:14:43 -0400 Subject: [PATCH] Added link Unscheduled (Backlog) Items. --- Skrumaz/src/main/AndroidManifest.xml | 4 +-- .../app/data/WebService/GetArtifacts.java | 30 ++++++++++++------- .../app/data/WebService/GetIterations.java | 18 ++++------- .../com/skrumaz/app/utils/ClientInfo.java | 2 +- 4 files changed, 29 insertions(+), 25 deletions(-) diff --git a/Skrumaz/src/main/AndroidManifest.xml b/Skrumaz/src/main/AndroidManifest.xml index 0672f7f..36e3467 100644 --- a/Skrumaz/src/main/AndroidManifest.xml +++ b/Skrumaz/src/main/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="103" + android:versionName="1.0.3" > diff --git a/Skrumaz/src/main/java/com/skrumaz/app/data/WebService/GetArtifacts.java b/Skrumaz/src/main/java/com/skrumaz/app/data/WebService/GetArtifacts.java index f7563dd..f3813d2 100644 --- a/Skrumaz/src/main/java/com/skrumaz/app/data/WebService/GetArtifacts.java +++ b/Skrumaz/src/main/java/com/skrumaz/app/data/WebService/GetArtifacts.java @@ -130,12 +130,17 @@ public void GetUserStories(Context context) { // Setup HTTP Request DefaultHttpClient httpClient = new DefaultHttpClient(); - String fetchOwner = ""; - String whereQuery = "((Iteration.Oid%20=%20%22" + iteration.getOid() + "%22)%20and%20(Owner.Name%20=%20%22" + Preferences.getUsername(context) + "%22))"; + String fetchOwner = ",Owner"; + String whereQuery = "((Iteration.Oid%20=%20%22" + iteration.getOid() + "%22)"; - if (Preferences.showAllOwners(context)) { - fetchOwner = ",Owner"; - whereQuery = "(Iteration.Oid%20=%20%22" + iteration.getOid() + "%22)"; + // Get Backlog Items + if (iteration.getOid() == Long.MAX_VALUE) { + whereQuery = "((Iteration.Name%20=%20%22%22)"; + } + + if (!Preferences.showAllOwners(context)) { + fetchOwner = ""; + whereQuery += "%20and%20(Owner.Name%20=%20%22" + Preferences.getUsername(context) + "%22))"; } HttpGet get = new HttpGet("https://rally1.rallydev.com/slm/webservice/v2.0/hierarchicalrequirement?query=" + whereQuery + "&pagesize=100&fetch=Tasks:summary[FormattedID;Name],Rank,FormattedID,Blocked,ScheduleState,LastUpdateDate" + fetchOwner); @@ -210,12 +215,17 @@ public void GetDefects(Context context) { // Setup HTTP Request DefaultHttpClient httpClient = new DefaultHttpClient(); - String fetchOwner = ""; - String whereQuery = "((Iteration.Oid%20=%20%22" + iteration.getOid() + "%22)%20and%20(Owner.Name%20=%20%22" + Preferences.getUsername(context) + "%22))"; + String fetchOwner = ",Owner"; + String whereQuery = "((Iteration.Oid%20=%20%22" + iteration.getOid() + "%22)"; + + // Get Backlog Items + if (iteration.getOid() == Long.MAX_VALUE) { + whereQuery = "((Iteration.Name%20=%20%22%22)"; + } - if (Preferences.showAllOwners(context)) { - fetchOwner = ",Owner"; - whereQuery = "(Iteration.Oid%20=%20%22" + iteration.getOid() + "%22)"; + if (!Preferences.showAllOwners(context)) { + fetchOwner = ""; + whereQuery += "%20and%20(Owner.Name%20=%20%22" + Preferences.getUsername(context) + "%22))"; } HttpGet get = new HttpGet("https://rally1.rallydev.com/slm/webservice/v2.0/defects?query=" + whereQuery + "&pagesize=100&fetch=Tasks:summary[FormattedID;Name],Rank,FormattedID,Blocked,ScheduleState,LastUpdateDate" + fetchOwner); diff --git a/Skrumaz/src/main/java/com/skrumaz/app/data/WebService/GetIterations.java b/Skrumaz/src/main/java/com/skrumaz/app/data/WebService/GetIterations.java index fb75741..988898c 100644 --- a/Skrumaz/src/main/java/com/skrumaz/app/data/WebService/GetIterations.java +++ b/Skrumaz/src/main/java/com/skrumaz/app/data/WebService/GetIterations.java @@ -5,6 +5,7 @@ import com.skrumaz.app.MainActivity; import com.skrumaz.app.classes.Iteration; +import com.skrumaz.app.classes.IterationStatus; import com.skrumaz.app.classes.Project; import com.skrumaz.app.data.Preferences; import com.skrumaz.app.data.Store.Iterations; @@ -122,18 +123,11 @@ private void GetProjectIterations(Context context) { ((MainActivity)context).SetProgress("Getting Iterations..."); // Add Backlog Link - //Iteration backlog = new Iteration(); - //backlog.setName("Backlog"); - //backlog.setOid(Long.parseLong("0")); - //backlog.setIterationStatus(IterationStatus.RD_PLANNED); - //iterations.add(backlog); - - // Add Backlog Link - //Iteration backlog = new Iteration(); - //backlog.setName("Backlog"); - //backlog.setOid(Long.parseLong("0")); - //backlog.setIterationStatus(IterationStatus.RD_PLANNED); - //iterations.add(backlog); + Iteration backlog = new Iteration(); + backlog.setName("Unscheduled"); + backlog.setOid(Long.MAX_VALUE); + backlog.setIterationStatus(IterationStatus.RD_PLANNED); + iterations.add(backlog); // Setup HTTP Request DefaultHttpClient httpClient = new DefaultHttpClient(); diff --git a/Skrumaz/src/main/java/com/skrumaz/app/utils/ClientInfo.java b/Skrumaz/src/main/java/com/skrumaz/app/utils/ClientInfo.java index 7b01393..0607ddb 100644 --- a/Skrumaz/src/main/java/com/skrumaz/app/utils/ClientInfo.java +++ b/Skrumaz/src/main/java/com/skrumaz/app/utils/ClientInfo.java @@ -8,7 +8,7 @@ */ public class ClientInfo { - private static String appVersionName = "1.0.2"; + private static String appVersionName = "1.0.3"; public static HttpGet addHttpGetHeaders(HttpGet httpGet) { httpGet.setHeader("X-RallyIntegrationName", "Skrumaz");