Skip to content

Commit

Permalink
Added link Unscheduled (Backlog) Items.
Browse files Browse the repository at this point in the history
  • Loading branch information
PaitoAnderson committed May 14, 2014
1 parent 5c9c17a commit 3d92608
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 25 deletions.
4 changes: 2 additions & 2 deletions Skrumaz/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.skrumaz.app"
android:versionCode="102"
android:versionName="1.0.2" >
android:versionCode="103"
android:versionName="1.0.3" >

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 3d92608

Please sign in to comment.