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

Empty Group select in Workflow rule #24912

Closed
ClCfe opened this issue Dec 30, 2020 · 1 comment
Closed

Empty Group select in Workflow rule #24912

ClCfe opened this issue Dec 30, 2020 · 1 comment

Comments

@ClCfe
Copy link

ClCfe commented Dec 30, 2020

Hello

If you edit an existing workflow with group rules, and that you have more than 20 groups in database, group selects are not properly initialized

if (this.groups.length === 0) {
await this.searchAsync('')
}

initialization should be done without limit=20 parameter here

return axios.get(generateOcsUrl('cloud', 2) + 'groups/details?limit=20&search=' + encodeURI(searchQuery)).then((response) => {

otherwise, some fields are empty instead of dispalying group names (because this.groups contains only 20 entries, and not all the groups possibly involved in the rules)

I think a good way to resolve this is adding a limit parameter to searchAsync(searchQuery, limit=20)
if limit is null, no limit parameter should be added to the axios query

if (this.groups.length === 0) {
	await this.searchAsync('', null)
}

Of course the best way to solve this should be that you pass to the axios query an array of groups IDs already involved in the rules of the edited workflow, but this implies changes on the backend

@kesselb
Copy link
Contributor

kesselb commented Dec 30, 2020

Duplicate of #24547

@kesselb kesselb marked this as a duplicate of #24547 Dec 30, 2020
@kesselb kesselb closed this as completed Dec 30, 2020
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

No branches or pull requests

2 participants