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

Allow mentioning to happen on new work packages #14666

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 11 additions & 3 deletions frontend/src/app/core/path-helper/apiv3-paths.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { ApiV3FilterBuilder } from 'core-app/shared/helpers/api-v3/api-v3-filter-builder';
import { WorkPackageResource } from 'core-app/features/hal/resources/work-package-resource';
import { HalResource } from 'core-app/features/hal/resources/hal-resource';

export class ApiV3Paths {
readonly apiV3Base:string;
Expand Down Expand Up @@ -35,12 +37,18 @@ export class ApiV3Paths {
* https://github.com/opf/commonmark-ckeditor-build/
*
*/
public principals(workPackageId:string|number, term:string|null) {
public principals(workPackage:WorkPackageResource, term:string|null) {
const filters:ApiV3FilterBuilder = new ApiV3FilterBuilder();
// Only real and activated users:
filters.add('status', '!', ['3']);
// that are members of that project:
filters.add('mentionable_on_work_package', '=', [workPackageId.toString()]);

if (!workPackage.id || workPackage.id === 'new') {
// that are members of that project:
filters.add('member', '=', [(workPackage.project as HalResource).id as string]);
} else {
// that are mentionable on the work package
filters.add('mentionable_on_work_package', '=', [workPackage.id.toString()]);
}
// That are users:
filters.add('type', '=', ['User', 'Group']);

Expand Down
142,326 changes: 3 additions & 142,323 deletions frontend/src/vendor/ckeditor/ckeditor.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion frontend/src/vendor/ckeditor/ckeditor.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion frontend/src/vendor/ckeditor/translations/af.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/src/vendor/ckeditor/translations/ar.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion frontend/src/vendor/ckeditor/translations/ast.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/src/vendor/ckeditor/translations/az.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading