Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Milestones module development #343

Open
wants to merge 121 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
081cf03
Started implementation of create and edit function
arepina Nov 21, 2017
ae5596c
Add List view of all repository milestones
UEvgeniy Dec 16, 2017
2d6fe3f
Milestones list localization
UEvgeniy Dec 16, 2017
2c8f445
Add create milestone button
UEvgeniy Dec 16, 2017
56e2ae2
Add mock for click on milestone
UEvgeniy Dec 16, 2017
970e2d0
Merge pull request #44 from AndreySBer/milestones_list_view
phansier Dec 16, 2017
f7ba846
Opening create milestone page by plus
arepina Dec 17, 2017
e2a05c3
Added date picker
arepina Dec 17, 2017
0f89372
Added 2 weeks and 1 month
arepina Dec 17, 2017
1d4b946
Milestones Service
tsnik Dec 17, 2017
3c2e2f3
Fixed the dates in piker
arepina Dec 17, 2017
97ef560
CreateMilestoneTask
tsnik Dec 17, 2017
177aff9
Display closed milestone in repo
phansier Dec 17, 2017
f789379
EditMilestone Task
tsnik Dec 17, 2017
fcff329
Change Headers in MilestoneService
tsnik Dec 17, 2017
61d168e
Delete milestone in MilestoneService
tsnik Dec 17, 2017
fe86c30
Chage tag in editMilestone
tsnik Dec 17, 2017
095bbf9
DeleteMilestone task
tsnik Dec 17, 2017
be4ea89
Add localisation for RU edit milestone
phansier Dec 17, 2017
e98304c
Fix NPE crash on milestone edit page
phansier Dec 17, 2017
a49d793
Fix layout
phansier Dec 17, 2017
25634e3
Merge pull request #46 from AndreySBer/feature_milestones_api_interface
phansier Dec 17, 2017
46b674a
Refactor adding 1 month
phansier Dec 17, 2017
7f9bcc3
Merge pull request #47 from AndreySBer/create_and_edit_milestone
phansier Dec 17, 2017
98123ee
mockup classes
Motoaleks Dec 20, 2017
3e97b5c
Initial detailed milestone view
Motoaleks Dec 21, 2017
cd188da
Styles added to milestone view
Motoaleks Dec 21, 2017
bc378c7
Return gradle properties back
phansier Dec 21, 2017
2fe6404
Merge branch 'iss8_milestine_view_page' of https://github.com/AndreyS…
Motoaleks Dec 21, 2017
6e2c675
Displaying closed issues in milestone
Motoaleks Dec 21, 2017
0bddafe
Excessive button to show closed issues removed.
Motoaleks Dec 28, 2017
ce9fb35
Merge pull request #50 from AndreySBer/iss8_milestine_view_page
phansier Dec 28, 2017
ee9cd86
Tried to fix the menu
arepina Dec 29, 2017
01ed3cc
Added view of milestone
arepina Jan 1, 2018
59a4f43
Changed imports to new
arepina Jan 1, 2018
233d72c
Add old<->new Milestone mappers
phansier Jan 1, 2018
c3b3504
Add old<->new Milestone mappers[1]
phansier Jan 3, 2018
620200e
Crush fixed.
Motoaleks Jan 6, 2018
d1137ac
Time left/past badge added
Motoaleks Jan 6, 2018
f19b59f
Milestone state check + some comments
Motoaleks Jan 6, 2018
255aef7
Fixed the date bug
arepina Jan 11, 2018
9df359c
Added edit
arepina Jan 11, 2018
ff7665e
Added onActivityResult
arepina Jan 12, 2018
19429a6
Colorize issues in milestone item
UEvgeniy Jan 12, 2018
db30f03
Fixed the back button bug
arepina Jan 13, 2018
7affe5d
Merge pull request #58 from AndreySBer/ms_item_colorize_issues
phansier Jan 15, 2018
d8d5aaf
Unify & simplify date representation
phansier Jan 15, 2018
5a29dc2
Merge pull request #57 from AndreySBer/edit_milestone
phansier Jan 15, 2018
6fa48a4
Milestone view translated to russian.
Motoaleks Jan 15, 2018
80c2d1a
Closed milestone badge logic.
Motoaleks Jan 15, 2018
411a16b
Merge branch 'master' into milestone_view
phansier Jan 16, 2018
ff8356f
Merge pull request #55 from AndreySBer/milestone_view
phansier Jan 16, 2018
cc7da89
Fix import from merge resolve
phansier Jan 16, 2018
6d3f519
Added creation of new milestone
arepina Jan 17, 2018
548d9fd
Bug fix
UEvgeniy Jan 19, 2018
5377028
Update milestones list after changes
UEvgeniy Jan 20, 2018
2757d25
Merge pull request #68 from AndreySBer/ms_list_dueto_fix
phansier Jan 20, 2018
b45e03c
Remove MILESTONE_CREATE req_code
UEvgeniy Jan 20, 2018
c73bfad
Merge pull request #67 from AndreySBer/new_milestone
phansier Jan 20, 2018
f2e7240
Crash at repositories issues & commits & projects FIXED
phansier Jan 20, 2018
45e45df
Merge pull request #69 from AndreySBer/fix_crash_61
phansier Jan 20, 2018
1f78dbd
Update API
tsnik Jan 24, 2018
4f5ff22
Add issue dialog
tsnik Jan 24, 2018
fdfe8f5
Add issue to dialog logic
tsnik Jan 24, 2018
d03ed67
Minor code style fixed
phansier Jan 26, 2018
5f549cc
Merge pull request #75 from AndreySBer/feature-addIssueToMilestone
phansier Jan 26, 2018
8c0ed93
Fast fix. No crush anymore.
Motoaleks Jan 26, 2018
2bcf70e
Individual view dissapeares if milestone date/description
Motoaleks Jan 26, 2018
aaeb72d
Merge remote-tracking branch 'origin/master' into bug-date-crash
Motoaleks Jan 26, 2018
4719e9e
Fixed. But clear option not working properly cause of API problem.
Motoaleks Jan 27, 2018
33e9980
Fix bug #77
tsnik Jan 27, 2018
c21e65b
Fixed!?
Motoaleks Jan 27, 2018
9a3f483
Fix bug #64
tsnik Jan 27, 2018
f3928f2
Fix bug #60
tsnik Jan 27, 2018
af5a5a0
Refactor
tsnik Jan 29, 2018
8e2b5db
Merge pull request #78 from AndreySBer/bugfix-77
phansier Jan 29, 2018
7043b70
Extract constant values
phansier Jan 29, 2018
135d903
Merge pull request #80 from AndreySBer/bugfix-64-nulldate
phansier Jan 29, 2018
9aeb8a2
Merge branch 'master' into bug-transition-iss-ms
phansier Jan 29, 2018
a8fecea
Fix code style and bracket after merge
phansier Jan 29, 2018
25824b6
Merge pull request #79 from AndreySBer/bug-transition-iss-ms
phansier Jan 29, 2018
0f80cc2
Merge branch 'master' into bugfix-60-dateproblem
phansier Jan 29, 2018
b39189c
Fix code style and name of EditText after merge
phansier Jan 29, 2018
25bd40d
Merge pull request #81 from AndreySBer/bugfix-60-dateproblem
phansier Jan 29, 2018
90b08e0
Fix X pattern crash on Android API <24
phansier Jan 30, 2018
6073cbc
Merge pull request #85 from AndreySBer/Fix_X_pattern_crash_API24
tsnik Jan 30, 2018
f8a2b01
Fix bug #82
tsnik Jan 30, 2018
fb43465
Fix codestyle
phansier Jan 30, 2018
ae70857
Merge pull request #93 from AndreySBer/bugfix-82-createMilestone
phansier Jan 30, 2018
02863ad
Fixed the test
arepina Jan 31, 2018
69ccc84
Saving MS with empty title logic changed
UEvgeniy Feb 6, 2018
ed44be6
Fix codestyle in strings.xml
phansier Feb 7, 2018
d61237d
Merge pull request #99 from AndreySBer/enhancement-91
phansier Feb 7, 2018
cf31ab7
Fix crashes found by ui tests
phansier Feb 7, 2018
e860b82
Merge pull request #98 from AndreySBer/test_run
phansier Feb 7, 2018
c57c96b
Added milestone support in old issue class
Motoaleks Feb 8, 2018
fd6a50a
Fragment replace with updated milestone.
Motoaleks Feb 8, 2018
e518b7c
Merge pull request #100 from AndreySBer/bugfix-73-milestoneNotDisplaying
phansier Feb 8, 2018
e4602e6
Merge pull request #101 from AndreySBer/bugfix-88-filterNotUpdating
phansier Feb 8, 2018
baa1bd8
Fix & add russian translations
phansier Feb 8, 2018
4cc54a6
Change milestone translation in RU on more appropriate
phansier Feb 8, 2018
00d3e2b
Hotfix milestone translation in RU on more appropriate
phansier Feb 8, 2018
cd41a4a
Merge pull request #102 from AndreySBer/#39_translations
phansier Feb 8, 2018
6e47980
Merge pull request #26 from jonan/master
UEvgeniy Feb 8, 2018
bf37592
Milestone list
phansier Feb 19, 2018
ab0329d
Dialog issue list
phansier Feb 19, 2018
c4d3159
Allign buttons on Milestone edit
phansier Feb 19, 2018
4b87e74
Revert: Remove unnecessary string (login_or_email)
phansier Feb 23, 2018
e3a85c2
Revert: Change milestone translation in RU on more appropriate
phansier Feb 23, 2018
9e5ae56
Use new Milestone model in IssueFilterTest
phansier Feb 23, 2018
30048f0
Fix Whitespace missing before {
phansier Feb 23, 2018
0883b55
Remove comments about Milestone new to old model mapping issues
phansier Feb 23, 2018
f493fe9
Make use the plural "Milestones" here (ru+en locals)
phansier Feb 23, 2018
d3658ad
Revert: return issue filtering code
phansier Feb 23, 2018
19d4db3
Avoid NPE in getting old milestone
phansier Feb 23, 2018
f2044a2
Remove redundant headers
tsnik Feb 24, 2018
42f616c
Merge pull request #105 from AndreySBer/ui_changes
phansier Feb 25, 2018
d2b391c
Merge pull request #104 from AndreySBer/pr_comments_fix
phansier Feb 25, 2018
68a24e6
Revert Incorrect transition between issue and milestone activities
phansier Mar 5, 2018
f60a50e
Merge branch 'pr_comments_fix' of https://github.com/AndreySBer/ForkH…
phansier Mar 5, 2018
4b38c89
Merge pull request #107 from AndreySBer/pr_comments_fix
phansier Mar 5, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

import android.test.AndroidTestCase;

import com.github.mobile.api.model.Milestone;
import com.github.mobile.core.issue.IssueFilter;

import org.eclipse.egit.github.core.Milestone;
import org.eclipse.egit.github.core.Repository;
import org.eclipse.egit.github.core.User;

Expand Down Expand Up @@ -56,7 +56,8 @@ public void testEqualFilter() {
assertEquals(filter1, filter2);
assertEquals(filter1.hashCode(), filter2.hashCode());

Milestone milestone = new Milestone().setNumber(3);
Milestone milestone = new Milestone();
milestone.number = 3;
filter1.setMilestone(milestone);
assertFalse(filter1.equals(filter2));
filter2.setMilestone(milestone);
Expand Down
26 changes: 26 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,32 @@
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:name=".ui.milestone.EditMilestoneActivity"
android:configChanges="orientation|keyboardHidden|screenSize">
<intent-filter>
<action android:name="jp.forkhub.mobile.repo.milestones.edit.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".ui.repo.RepositoryMilestonesActivity"
android:configChanges="orientation|keyboardHidden|screenSize">
<intent-filter>
<action android:name="jp.forkhub.mobile.repo.milestones.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".ui.milestone.MilestoneViewActivity"
android:configChanges="orientation|keyboardHidden|screenSize">
<intent-filter>
<action android:name="jp.forkhub.mobile.repo.milestone.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".ui.search.SearchActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/java/com/github/mobile/GitHubModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.github.mobile.accounts.GitHubAccount;
import com.github.mobile.api.DateAdapter;
import com.github.mobile.api.RequestConfiguration;
import com.github.mobile.api.model.Milestone;
import com.github.mobile.core.commit.CommitStore;
import com.github.mobile.core.gist.GistStore;
import com.github.mobile.core.issue.IssueStore;
Expand All @@ -33,6 +34,7 @@
import com.google.inject.Singleton;
import com.google.inject.assistedinject.FactoryModuleBuilder;
import com.google.inject.name.Named;
import com.squareup.moshi.JsonAdapter;
import com.squareup.moshi.Moshi;

import java.io.File;
Expand Down Expand Up @@ -80,8 +82,11 @@ Retrofit retrofit(Provider<GitHubAccount> accountProvider) {
.addInterceptor(new RequestConfiguration(accountProvider))
.build();

JsonAdapter<Milestone> adapter =
new Moshi.Builder().add(new DateAdapter()).build().adapter(Milestone.class).serializeNulls();
Moshi converter = new Moshi.Builder()
.add(new DateAdapter())
.add(Milestone.class, adapter)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need a custom adapter for milestones?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To allow setting null due_date for milestone

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't you achieve the same result by modifying the current DateAdapter?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, default adapter for milestones just ignores null properties.
So there is no other way to send patch request with due_on = null.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we set due_on = null, then DateAdapter is not being called by Milestone adapter because it skips null properties.
Yes, we can achieve it only with DateAdapter, if use some date as null. For example, DateAdapter will replace 01/01/1990 to null. But I am not sure, that it is a better alternative.

.build();

return new Retrofit.Builder()
Expand Down
16 changes: 16 additions & 0 deletions app/src/main/java/com/github/mobile/Intents.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import static org.eclipse.egit.github.core.RepositoryId.createFromUrl;
import android.content.Intent;

import com.github.mobile.api.model.Milestone;
import com.github.mobile.api.model.Project;
import com.github.mobile.api.model.Team;

Expand Down Expand Up @@ -81,6 +82,11 @@ public class Intents {
*/
public static final String EXTRA_ISSUE = INTENT_EXTRA_PREFIX + "ISSUE";

/**
* Milestone handle
*/
public static final String EXTRA_MILESTONE = INTENT_EXTRA_PREFIX + "MILESTONE";

/**
* Issue number collection handle
*/
Expand Down Expand Up @@ -250,6 +256,16 @@ public Builder issue(Issue issue) {
issue).add(EXTRA_ISSUE_NUMBER, issue.getNumber());
}

/**
* Add milestone to intent being built up
*
* @param milestone
* @return this builder
*/
public Builder milestone(Milestone milestone) {
return add(EXTRA_MILESTONE, milestone);
}

/**
* Add project to intent being built up
*
Expand Down
10 changes: 10 additions & 0 deletions app/src/main/java/com/github/mobile/RequestCodes.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,14 @@ public interface RequestCodes {
* Request to delete a comment
*/
int COMMENT_DELETE = 15;

/**
* Request to view milestone
*/
int MILESTONE_VIEW = 16;

/**
* Request to edit milestone
*/
int MILESTONE_EDIT = 17;
}
5 changes: 5 additions & 0 deletions app/src/main/java/com/github/mobile/ServicesModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ MilestoneService milestoneService(GitHubClient client) {
return new MilestoneService(client);
}

@Provides
com.github.mobile.api.service.MilestoneService milestoneService(Retrofit retrofit) {
return retrofit.create(com.github.mobile.api.service.MilestoneService.class);
}

@Provides
LabelService labelService(GitHubClient client) {
return new LabelService(client);
Expand Down
10 changes: 8 additions & 2 deletions app/src/main/java/com/github/mobile/api/model/Issue.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@
*/
package com.github.mobile.api.model;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

public class Issue {
public class Issue implements Serializable {
public long id;

public Repository repository;
Expand Down Expand Up @@ -76,6 +77,11 @@ public org.eclipse.egit.github.core.Issue getOldModel() {
issue.setCreatedAt(created_at);
issue.setClosedAt(closed_at);
issue.setUpdatedAt(updated_at);

if (milestone != null){
issue.setMilestone(milestone.getOldModel());
}

if (user != null) {
issue.setUser(user.getOldModel());
}
Expand All @@ -87,4 +93,4 @@ public org.eclipse.egit.github.core.Issue getOldModel() {
}
return issue;
}
}
}
40 changes: 39 additions & 1 deletion app/src/main/java/com/github/mobile/api/model/Milestone.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@
*/
package com.github.mobile.api.model;

import java.io.Serializable;
import java.util.Date;

public class Milestone {
public class Milestone implements Serializable {
public static final String MS_STATE_OPEN = "open";
public long id;

public int number;
Expand All @@ -41,4 +43,40 @@ public class Milestone {
public Date closed_at;

public Date due_on;

private String url;

public Milestone() {
state = MS_STATE_OPEN;
}

public Milestone(org.eclipse.egit.github.core.Milestone milestone) {
this.number = milestone.getNumber();
this.state = milestone.getState();
this.title = milestone.getTitle();
this.description = milestone.getDescription();
org.eclipse.egit.github.core.User creator = milestone.getCreator();
this.creator = creator == null ? null : new User(creator);
this.open_issues = milestone.getOpenIssues();
this.closed_issues = milestone.getClosedIssues();
this.created_at = milestone.getCreatedAt();
this.url = milestone.getUrl();
this.due_on = milestone.getDueOn();
}

public org.eclipse.egit.github.core.Milestone getOldModel() {
org.eclipse.egit.github.core.Milestone milestone = new org.eclipse.egit.github.core.Milestone();
milestone.setCreatedAt(created_at);
milestone.setDueOn(due_on);
milestone.setClosedIssues(closed_issues);
milestone.setNumber(number);
milestone.setOpenIssues(open_issues);
milestone.setDescription(description);
milestone.setState(state);
milestone.setTitle(title);
milestone.setUrl(url);
milestone.setCreator(creator.getOldModel());

return milestone;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ Call<Issue> getIssue(
@Path("repo") String repo,
@Path("number") long number);

@Headers("Accept: application/vnd.github.squirrel-girl-preview")
@GET("repos/{owner}/{repo}/issues")
Call<List<Issue>> getIssues(
@Path("owner") String owner,
@Path("repo") String repo,
@Query("milestone") String milestone);

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This request doesn't work with pagination (we can fix it in a future commit if you prefer)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We prefer to fix it in future because it is not the vital problem for milestones

@Headers({"Accept: application/vnd.github.v3.full+json",
"Accept: application/vnd.github.mockingbird-preview",
"Accept: application/vnd.github.squirrel-girl-preview"})
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
* Copyright 2016 Jon Ander Peñalba
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.mobile.api.service;

import com.github.mobile.api.model.Issue;
import com.github.mobile.api.model.Milestone;
import java.util.List;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.PATCH;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;

public interface MilestoneService {
@GET("repos/{owner}/{repo}/milestones/{number}")
Call<Milestone> getMilestone(
@Path("owner") String owner,
@Path("repo") String repo,
@Path("number") long number);

@GET("repos/{owner}/{repo}/milestones")
Call<List<Milestone>> getMilestones(
@Path("owner") String owner,
@Path("repo") String repo);

@Headers("Accept: application/vnd.github.squirrel-girl-preview")
@GET("repos/{owner}/{repo}/issues")
Call<List<Issue>> getIssues(
@Path("owner") String owner,
@Path("repo") String repo,
@Query("milestone") long milestone);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More pagination problems.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We prefer to fix it in future because it is not the vital problem for milestones


@POST("repos/{owner}/{repo}/milestones")
Call<Milestone> createMilestone (
@Path("owner") String owner,
@Path("repo") String repo,
@Body Milestone milestone);

@PATCH("repos/{owner}/{repo}/milestones/{number}")
Call<Milestone> editMilestone (
@Path("owner") String owner,
@Path("repo") String repo,
@Path("number") long number,
@Body Milestone milestone);

@DELETE("repos/{owner}/{repo}/milestones/{number}")
Call<Milestone> deleteMilestone(
@Path("owner") String owner,
@Path("repo") String repo,
@Path("number") long number);
}
11 changes: 6 additions & 5 deletions app/src/main/java/com/github/mobile/core/issue/IssueFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*/
package com.github.mobile.core.issue;

import com.github.mobile.api.model.Milestone;

import static java.lang.String.CASE_INSENSITIVE_ORDER;
import static org.eclipse.egit.github.core.service.IssueService.DIRECTION_DESCENDING;
import static org.eclipse.egit.github.core.service.IssueService.FIELD_DIRECTION;
Expand All @@ -39,7 +41,6 @@
import java.util.TreeSet;

import org.eclipse.egit.github.core.Label;
import org.eclipse.egit.github.core.Milestone;
import org.eclipse.egit.github.core.Repository;
import org.eclipse.egit.github.core.User;

Expand Down Expand Up @@ -185,7 +186,7 @@ public Map<String, String> toFilterMap() {

if (milestone != null)
filter.put(FILTER_MILESTONE,
Integer.toString(milestone.getNumber()));
Integer.toString(milestone.number));

if (labels != null && !labels.isEmpty()) {
StringBuilder labelsQuery = new StringBuilder();
Expand Down Expand Up @@ -217,7 +218,7 @@ public CharSequence toDisplay() {
segments.add("Assignee: " + assignee.getLogin());

if (milestone != null)
segments.add("Milestone: " + milestone.getTitle());
segments.add("Milestone: " + milestone.title);

if (labels != null && !labels.isEmpty()) {
StringBuilder builder = new StringBuilder("Labels: ");
Expand All @@ -243,7 +244,7 @@ public CharSequence toDisplay() {
public int hashCode() {
return Arrays.hashCode(new Object[] { open,
assignee != null ? assignee.getId() : null,
milestone != null ? milestone.getNumber() : null,
milestone != null ? milestone.number : null,
assignee != null ? assignee.getId() : null,
repository != null ? repository.getId() : null, labels });
}
Expand All @@ -257,7 +258,7 @@ private boolean isEqual(Object a, Object b) {
private boolean isEqual(Milestone a, Milestone b) {
if (a == null && b == null)
return true;
return a != null && b != null && a.getNumber() == b.getNumber();
return a != null && b != null && a.number == b.number;
}

private boolean isEqual(User a, User b) {
Expand Down
Loading