Skip to content

Conversation

@ankurjuneja
Copy link
Contributor

Rationale

https://github.com/LabKey/internal-issues/issues/591

Related Pull Requests

Changes

  • display error message when custom metric with same name exists

Copy link
Contributor

@labkey-jeckels labkey-jeckels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add some simple automated test coverage for this scenario.

In manual testing, I confirmed that this fixed the custom metric error handling. There's a similar repro for trace metrics that we should also address here.

// Check if metric name already exists
this.checkMetricNameExists(metricName, function (exists) {
if (exists) {
let errorMessage = 'A metric with the name "' + Ext4.util.Format.htmlEncode(metricName) + '" already exists. Please choose a different name.';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you're using setText(), this ends up double-encoding.,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants