Author Topic: Improvement: Input Vailidation  (Read 3452 times)

itcanadian

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
Improvement: Input Vailidation
« on: January 25, 2012, 21:52:30 »
If this is already addressed somewhere, please disregard.  I originally posted this is another topic but figured this was the more appropriate location.  Thanks!

Here's are the scenarios:

Scenario A:  Agent A logs into the Webui and runs "Add Member" for their appropriate queue.  In the process, not paying attention, they enter their numeric password under "Extension" rather then their current extension, or they have a typo in their extension (ie. ext 2105 gets entered as 2015).  Queue metrics accepts this information and adds the bogus extension to the provided queue.

Scenario B: Agent A logs into the Webui and runs "Add Member" for their appropriate queue.  In the process, they have a typo in the extension number which happens to coincide with the active extension of Agent B in a different queue.  Agent B then starts receiving calls for a queue that they aren't a functional member of.

Scenario C: Agent A logs into the Webui and runs "Add Member" for their appropriate queue.  In the process, they inadvertently add a space following their extension number.  Calls are successfully routed to the correct destination.  At the end of the Agent's shift, they initiate a remove member, but this time they enter in the correct extension without the white space.  The Remove Member isn't successful unless they add the extra white space entered during the Add Member.

Requests:

Scenario A: I'd like to see extension validation to confirm the extension entered actually exists on the PBX.
Scenario B: I'd like to see an error occur when an agent attempts to log into an extension already in a queue under another Agent's name.
Scenario C: It looks like improved input sanitation is required.

Mike.

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Improvement: Input Vailidation
« Reply #1 on: January 26, 2012, 16:28:41 »
You may want to speak about a customization?

itcanadian

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
Re: Improvement: Input Vailidation
« Reply #2 on: February 01, 2012, 17:29:50 »
For some of the items, a customization may be more appropriate.  The one area where I disagree is the input validation.  To me it's a bug that a space can be entered under extension and have that extension and white space placed in the queue exactly as typed.  This prevents somebody from removing member due to the unknown space...

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Improvement: Input Vailidation
« Reply #3 on: February 15, 2012, 17:50:54 »
Yes I agree. As this is a trivial change we are adding this as a bug #1581

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Improvement: Input Vailidation
« Reply #4 on: April 26, 2012, 10:22:12 »
This has been fixed in the upcoming release.

Instead of just removing spaces, we add an (optional) regular expression for agent code and for the extension, like e.g.:


Code: [Select]
# The regexp to validate agent codes
realtime.agentRegexp=1\\d\\d

#A regexp to validate extension codes
realtime.extensionRegexp=\\d\\d\\d0

This allows only three digits agent codes like  1XX and no other character, and only  four digits extensions ending in zero like XXX0. All other codes will be rejected with an error message.

Please note that the backslash in the regexp has to be written as "\\" in the configuration.properties file.