RFR: 2167: Unify search methods in IssueProject
Erik Joelsson
erikj at openjdk.org
Tue Jan 30 14:21:20 UTC 2024
On Tue, 30 Jan 2024 13:47:34 GMT, Erik Duveblad <ehelin at openjdk.org> wrote:
> Hi all,
>
> this patch unifies the various ways of searching that exist within `JiraProejct`. I also chose to expose the `search` method in the `IssueProject` since I will make use of it in later patches. This is the first patch of _many_ that will extract the JBS specific parts from `JiraProject` so that `JiraProject` will be about JIRA and JBS specific functionality will be moved elsewhere. This refactoring is needed to allow other parts of the Skara to use JBS functionality with only an `IssueProject` instance (without turning `JiraProject` into effectively `JbsProject`).
>
> Thanks,
> Erik
issuetracker/src/main/java/org/openjdk/skara/issuetracker/jira/JiraProject.java line 508:
> 506:
> 507: if (count < issues.get("total").asInt()) {
> 508: startAt += issues.get("issues").asArray().size();
Aren't `count` and `startAt` basically equivalent at this point? Seems a bit weird to have two values for basically the same thing but calculated differently.
issuetracker/src/main/java/org/openjdk/skara/issuetracker/jira/JiraProject.java line 513:
> 511: .param("startAt", String.valueOf(startAt));
> 512: if (limit > 0) {
> 513: req = req.param("maxResults", Integer.toString(limit));
Is the limit supposed to be the total limit or max size per page (would be great with javadoc specifying this btw)? The `maxResults` parameter is results returned per page. I would think a global limit to be more useful.
-------------
PR Review Comment: https://git.openjdk.org/skara/pull/1610#discussion_r1471302051
PR Review Comment: https://git.openjdk.org/skara/pull/1610#discussion_r1471307898
More information about the skara-dev
mailing list