arnoudkooi / ServiceNow-Utils

Browser Extension to enhance experience and productivity in ServiceNow
https://arnoudkooi.com
250 stars 117 forks source link

Weird slashcommand priority #535

Closed Kolymorph closed 3 weeks ago

Kolymorph commented 1 month ago

Not sure if directly bug but a kind of an annoyance - when using slashcommand the "exact" term doesn't always take priority, which can cause weird behavior when you expect it to just call the command you exactly spell out. Examples:

Anduh commented 1 month ago

(wasn't able to replicate this on Win10/FireFox/SN Utils OnPrem)

Some more info could help out with troubleshooting & trying to replicating this behavior.

Setup:

  1. Browser: Using Edge, Chrome or Firefox? Version?
  2. Extension & Version: Are you using SN Utils(green icon), or SN Utils OnPrem(purple icon)? What version is shown on About-tab?
  3. Operating System: Using Win/Mac/Linux? (rarely related but just in case)
  4. Using any other browser extensions interacting with SerciveNow? (unlikely to conflict, but who knows)

Context:

  1. When did you first notice this? If it's always been a thing, when did you start using the extension?
  2. How consistent is it, does it occur?
  3. Have you only seen this behavior on the mentioned prod instance, or also seen it on related test/demo instances? Have you replicated this in a PDI or other unrelated instance?
  4. Has this persisted if you tired with a different browser, or different computer?
  5. Do you know if anyone else also experienced it, like your colleagues doing similar things? (you could export your slashcommand as .json & share with a colleague to have them try the same)
arnoudkooi commented 1 month ago

As "Anduh" suggested, please add more context.

Anduh commented 1 month ago

Update: I've now also experienced this issue for the first time yesterday. Was when typing /inc, which changed selection to /sysidn.

I have a command /i (that I don't use) at order 5, which is a shortcut for /sysid. Changed it's order to 150 so it's after all my other commands, which resolved the issue for now.

Setup, Replication

arnoudkooi commented 1 month ago

I have not fully worked out the order field. It is more meant for less savvy users to have the most common ones for them in sight.

Kolymorph commented 1 month ago

Hi,

sorry I went for holiday after submitting 🤦 I am using chrome, will test other browsers later on. The most consistent way for me to replicate it is by typing /cmdb_ci quickly, it seems to not register the i on time and opens cmdb_categories instead. It seems as if there was a window of time where the tables are being loaded after I press the underscore, and if I type "i" quicker than they load, the load overrides the first result. I have managed to get a screenshot as well: image

Kolymorph commented 1 month ago

As for the order, I am not really sure how that works, but I would I would assume full command name would be prioritized always, otherwise having a command that is shorter but higher prio would not allow it to be used ever.

Forgot to add that I am using windows and the "green" utils (not on PREM)

arnoudkooi commented 1 month ago

You are not using the order field? Does the list update after hitting right arrow?

Kolymorph commented 1 month ago

For the ones in the image? No order there. The list gets updated after any action. It seems that the tables are being re-loaded after every key press, but u finish writing "ci" before the refresh for "c" happens. I think this would happen elsewhere too, but it seems that here it is specifically because it is only two letters so it is easy to enter quickly and the load time is long as there is a lot of cmdb tables

arnoudkooi commented 1 month ago

Behavior is that max 100 tables are loaded, until the number of returned table is <100 Maybe easiest to check in sometime to understand and troubleshoot the exact issue.

arnoudkooi commented 3 weeks ago

Please let me know if someone want to check in on this. For now closing it