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

Implemented filtering by repository on my tickets page #259

Merged
merged 9 commits into from May 27, 2015
Merged

Implemented filtering by repository on my tickets page #259

merged 9 commits into from May 27, 2015

Conversation

jeyoung
Copy link
Contributor

@jeyoung jeyoung commented May 19, 2015

OK, I think I got it right now. Pulled develop, then merged my ticket-57 changes on top of it.

@jeyoung jeyoung changed the title Ticket 57 develop Implemented filtering by repository on my tickets page May 19, 2015
// by repository
List<RepositoryModel> repositoryChoices = getRepositoryModels();
RepositoryModel noneChoice = new RepositoryModel();
noneChoice.name = Translation.get("gb.all");
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can't use Transation. Instead do this:

getString("gb.all");

@gitblit
Copy link
Collaborator

gitblit commented May 22, 2015

Aside from the little comments I made we have two larger problems. One is easily fixable. The other.... not sure.

  1. You can't search by the repository name. It's problematic because of punctuation marks, slashes, etc. Instead we must specify and search for the rid which is a hash of the repository name. So everywhere you specify a repository name value it must be the rid instead. RepositoryModel.getRID() will give you this value.
  2. We have a scaling problem. I have 50+ repos in my test environment. This generates a lengthy dropdown menu which scrolls offscreen. And it really won't scale for those with hundreds or thousands of repos so we need a better plan. The bootstap in-use is really old and we don't have scrollable dropdown menus. :( I think we need to list only the repos that are in the infiltered My Tickets resultset. That means we need to execute two Lucene queries. Hopefully the performance impact will be minor compared to the entire page-loading cycle.

@jeyoung
Copy link
Contributor Author

jeyoung commented May 22, 2015

@gitblit, re-submitted with changes based on your code review. Also changed the repository options to constrain to those relevant to the user's watched tickets.

(Sorry about the changes of tabs to spaces, please ignore white-space differences when you compare.)

@Override
public void populateItem(final Item<RepositoryModel> item) {
final RepositoryModel r = item.getModelObject();
PageParameters params = queryParameters(queryParam, milestoneParam, statiiParam, assignedToParam, sortBy, desc, r.getRID(), 1);
Copy link
Collaborator

Choose a reason for hiding this comment

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

String rid = r == noneChoice ? null : r.getRID();

Then use rid in the queryParameters call.

@gitblit
Copy link
Collaborator

gitblit commented May 23, 2015

Good work. We are very close now and this will be a nice usability improvement.

Removed default "watchedby" filter so that the default now includes "createdby", "responsible", watchedby" and "mention"
@jeyoung
Copy link
Contributor Author

jeyoung commented May 23, 2015

@gitblit These changes should be it. If no more review comments, I'll proceed with fixing the mentions bug, err, mentioned above.

@gitblit gitblit merged commit c33ac10 into gitblit-org:develop May 27, 2015
@gitblit
Copy link
Collaborator

gitblit commented May 27, 2015

Thanks Eddy! Merged.

@jeyoung
Copy link
Contributor Author

jeyoung commented May 27, 2015

A pleasure. I'd really like to look into implementing tickets across groups. Is that on the roadmap for 1.7.0? Otherwise, I can pick another 1.7.0 item.

@jeyoung jeyoung deleted the ticket-57_develop branch May 27, 2015 20:10
@gitblit
Copy link
Collaborator

gitblit commented May 27, 2015

Tickets are intricately tied to repositories. It would take some heroic changes (i.e. likely not mergeable) to accommodate that.

If you really wanted to explore that I would suggest implementing some sort of ticket-container object with it's own persistence mechanism and UI. Maybe this could be a plugin but I haven't spent more than 30 seconds thinking about this so maybe that is a dumb idea. ;)

@jeyoung
Copy link
Contributor Author

jeyoung commented May 27, 2015

Hmm. I forgot about the integration of tickets within repositories, but your idea of a “repository group ticket service” is worth pursuing. I’ll think about that a bit more this week-end.

From: James Moger [mailto:notifications@github.com]
Sent: 27 May 2015 22:18
To: gitblit/gitblit
Cc: Eddy Young
Subject: Re: [gitblit] Implemented filtering by repository on my tickets page (#259)

Tickets are intricately tied to repositories. It would take some heroic changes (i.e. likely not mergeable) to accommodate that.

If you really wanted to explore that I would suggest implementing some sort of ticket-container object with it's own persistence mechanism and UI. Maybe this could be a plugin but I haven't spent more than 30 seconds thinking about this so maybe that is a dumb idea. ;)


Reply to this email directly or view it on GitHub #259 (comment) . https://github.com/notifications/beacon/AAEGeQ7SfcrFMsr3E7Ox_AOTwonZBlYoks5oNiwFgaJpZM4Eg_wa.gif

gitblit added a commit that referenced this pull request Jun 15, 2015
@flaix flaix added this to the 1.7.0 milestone Mar 18, 2017
@flaix flaix added this to the 1.7.0 milestone Mar 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants