OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
[34358] Unclear warning message displayed when filtered value for assignee board does not match any member (#8695)
Behrokh Satarnejad17185ab40464
diff --git a/frontend/src/app/modules/boards/board/add-list-modal/add-list-modal.component.ts b/frontend/src/app/modules/boards/board/add-list-modal/add-list-modal.component.tsindex da22267bca2..859dc203c5e 100644--- a/frontend/src/app/modules/boards/board/add-list-modal/add-list-modal.component.ts+++ b/frontend/src/app/modules/boards/board/add-list-modal/add-list-modal.component.ts@@ -128,11 +128,6 @@ export class AddListModalComponent extends OpModalComponent implements OnInit {this.active = new Set(this.locals.active as string[]);this.actionService = this.boardActions.get(this.board.actionAttribute!);- this.actionService- .warningTextWhenNoOptionsAvailable()- .then((text) => {- this.warningText = text;- });this.requests@@ -141,6 +136,23 @@ export class AddListModalComponent extends OpModalComponent implements OnInit {this.untilDestroyed()).subscribe((values:unknown[]) => {+ let hasMember = false;+ if (values.length === 0) {+ if (this.requests.lastRequestedValue !== undefined && this.requests.lastRequestedValue !== '') {+ hasMember = true;+ }+ else {+ hasMember = false;+ }+ }+ else {+ hasMember = false;+ }+ this.actionService+ .warningTextWhenNoOptionsAvailable(hasMember)+ .then((text) => {+ this.warningText = text;+ });this.availableValues = values;this.showWarning = this.requests.lastRequestedValue !== undefined && (values.length === 0);this.cdRef.detectChanges();diff --git a/frontend/src/app/modules/boards/board/board-actions/assignee/assignee-action.service.ts b/frontend/src/app/modules/boards/board/board-actions/assignee/assignee-action.service.tsindex 20ef55f1327..7c51d5359d8 100644--- a/frontend/src/app/modules/boards/board/board-actions/assignee/assignee-action.service.ts+++ b/frontend/src/app/modules/boards/board/board-actions/assignee/assignee-action.service.ts@@ -84,8 +84,10 @@ export class BoardAssigneeActionService extends CachedBoardActionService {return AssigneeBoardHeaderComponent;}- public warningTextWhenNoOptionsAvailable() {- let text = this.I18n.t('js.boards.add_list_modal.warning.assignee');+ public warningTextWhenNoOptionsAvailable(hasMember?:boolean) {+ let text = hasMember ?+ this.I18n.t('js.boards.add_list_modal.warning.assignee'):+ this.I18n.t('js.boards.add_list_modal.warning.no_member');return this.apiV3Servicediff --git a/frontend/src/app/modules/boards/board/board-actions/board-action.service.ts b/frontend/src/app/modules/boards/board/board-actions/board-action.service.tsindex ae2ef16829b..4e4b1737088 100644--- a/frontend/src/app/modules/boards/board/board-actions/board-action.service.ts+++ b/frontend/src/app/modules/boards/board/board-actions/board-action.service.ts@@ -192,7 +192,7 @@ export abstract class BoardActionService {* Determines the specific warning to be shown, when there are no options to add as a list* @returns {the text or nothing}*/- warningTextWhenNoOptionsAvailable():Promise<string|undefined> {+ warningTextWhenNoOptionsAvailable(hasMember?:boolean):Promise<string|undefined> {return Promise.resolve(undefined);}diff --git a/modules/boards/config/locales/js-en.yml b/modules/boards/config/locales/js-en.ymlindex c19ecf75c03..f6e158dab8a 100644--- a/modules/boards/config/locales/js-en.yml+++ b/modules/boards/config/locales/js-en.yml@@ -79,7 +79,8 @@ en:status: |There is currently no status available. <br>Either there are none or they have all already been added to the board.- assignee: This project currently does not have any members that can be added. <br>+ assignee: There isn't any member matched with your filter value. <br>+ no_member: This project currently does not have any members that can be added. <br>add_members: <a href="%{link}">Add a new member to this project</a> to select users again.configuration_modal:title: 'Configure this board'