nickus opened a new pull request, #5439:
URL: https://github.com/apache/fineract/pull/5439
## Summary
Add validation to check for duplicate campaign names before creating or
updating SMS campaigns. This provides a user-friendly error message instead of
relying on database constraint violations.
## Changes
- Add `existsByCampaignName()` and `existsByCampaignNameAndIdNot()` methods
to `SmsCampaignRepository`
- Validate campaign name uniqueness in `create()` method before saving
- Validate campaign name uniqueness in `update()` method when name changes
- Add `SmsCampaignNameAlreadyExistsException` for clear error messages
## Test plan
- [x] Integration tests added for:
- Creating a campaign with a duplicate name should fail with appropriate
error
- Creating campaigns with unique names should succeed
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]