dosubot[bot] commented on issue #8413: URL: https://github.com/apache/incubator-devlake/issues/8413#issuecomment-2837638830
<!-- Greeting --> Hi @zeshanziya! I'm [Dosu](https://dosu.dev), a bot here to help you with bugs, answer questions, and assist you in becoming a contributor. I'm here while you wait for a human maintainer. How can I assist you today? <!-- Answer --> I found a similar closed issue: [Creating a connection with the same name will overwrite the previous one](https://github.com/apache/incubator-devlake/issues/4224). This issue was resolved by a pull request that addressed the problem of overwriting connections with the same name <sup>[[1]](https://github.com/apache/incubator-devlake/issues/4224)</sup>. Regarding your current issue, the duplicate error for Scope Configs across different connections of the same type seems to be related to how the UI handles the creation and validation of Scope Configs. The UI uses a validation process that checks for duplicate names across all connections, not just within the same connection type. This results in the error message: "The name of the current scope config is duplicated. Please modify it before saving" <sup>[[2]](https://github.com/apache/incubator-devlake/blob/main/backend/helpers/srvhelper/model_service_helper.go)</sup>. The current database schema enforces uniqueness constraints on the `Name` field of Scope Configs, which might be contributing to this behavior. The schema uses a uniqueness index on the `Name` field, ensuring that it is unique across all records <sup>[[3]](https://github.com/apache/incubator-devlake/blob/main/backend/plugins/opsgenie/models/migrationscripts/20231214_add_tool_opsgenie_scope_configs.go)</sup>. To achieve the expected behavior where Scope Configs are sharable across connections of the same type, changes would be needed in both the UI validation logic and the database schema to allow duplicate names across different connections of the same type. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/d839d27c-0b52-447c-ad86-2e0447d818e8?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/d839d27c-0b52-447c-ad86-2e0447d818e8?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/d839d27c-0b52-447c-ad86-2e0447d818e8?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/d839d27c-0b52-447c-ad86-2e0447d818e8?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/d839d27c-0b52-447c-ad86-2e0447d818e8?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/d839d27c-0b52-447c-ad86-2e0447d818e8?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/d839d27c-0b52-447c-ad86-2e0447d818e8?feedback_type=other)</sup> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@devlake.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org