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

[6.4.x] RHBPMS-4184,JBPM-5277 - getTasksAssignedAsPotentialOwner doesn't allow groups searching, only actorid #560

Merged
merged 1 commit into from Aug 30, 2016

Conversation

@@ -0,0 +1,50 @@
/*
* Copyright 2015 Red Hat, Inc. and/or its affiliates.
Copy link
Contributor

Choose a reason for hiding this comment

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

2016

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, thanks.

t.archived = 0 and
potOwners.id in (:groupIds) and
TYPE(potOwners) = 'Group'
order by t.id DESC
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor thing, but the lines in the from and where blocks should be indented for better readability.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Bikeshed! 🚲

Copy link
Contributor

Choose a reason for hiding this comment

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

I disagree.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. Last Jira, so what the heck?

public void claimNextAvailable(String userId, List<String> groupIds) {
executor.execute(new ClaimNextAvailableTaskCommand(userId));
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@psiroky See above (re: claim and claimNextAvailable)

Map<String, Object> params = new HashMap<String, Object>();
params.put("groupIds", groupIds);
return (List<TaskSummary>) persistenceContext.queryWithParametersInTransaction(
"TasksByPotentialOwnerGroups",
Copy link
Contributor

Choose a reason for hiding this comment

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

Possibly another bikeshed, but to be consistent with the naming in the other classes, should we use different name for the query, e.g. TasksByGroups?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Uhm.. If you insist on it, I'm happy to change it.

However, "TasksByPotentialOwnerGroups" describes exactly what the query does -- whereas "TasksByGroups" implies that the query is something else than what it is! For that reason, I'd like to keep the name to what it is, "TasksByPotentialOwnerGroups".

The operation name (getTasksByGroup) was decided by @krisv -- if you think it should be called something else, please talk to him.

@mrietveld
Copy link
Contributor Author

@mbiarnes This PR needs to be merged for the release. Thanks!

@psiroky
Copy link
Contributor

psiroky commented Aug 30, 2016

+1

@psiroky psiroky merged commit 9712f84 into kiegroup:6.4.x Aug 30, 2016
@mrietveld mrietveld deleted the pr-RHBPMS-4184-6.4.x branch August 30, 2016 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants