wso2 / carbon-device-mgt

Apache License 2.0
53 stars 113 forks source link

Fixed https://github.com/wso2/carbon-device-mgt/issues/1194 #1197

Closed Arcane94 closed 6 years ago

Arcane94 commented 6 years ago

Purpose

Resolving the issue of defined geofence area changing upon definition of another one with the same name. Resolves #1194.

Goals

Returning a 'Bad Request' response when a user tries to define an alert with a name of already existing alert.

Approach

Attempting to get the execution plan for the geo alert name, that user enters upon definition. If it doesn't exist, thrown AxisFault exception is caught. Then the registry is updated and a new alert is deployed. But if the execution plan already exists, an AlertAlreadyExist exception is thrown.

User stories

As a user I'm not allowed to define a geo alert with a name of an already existing one.

Release note

Fixing an issue when defining geo alerts with the same name.

Documentation

N/A

Training

N/A

Certification

N/A

Marketing

N/A

Automation tests

Security checks

Samples

N/A

Related PRs

N/A

Migrations (if applicable)

N/A

Test environment

JDK version: java 1.8.0_144 Operating System: Linux Ubuntu Databases: H2 Browser version: Google Chrome 62.0.3202.89

Learning

N/A