# Auto\_queues not changing when using auto\_accounts if account names contain underscores

**URL:** <https://discourse.openondemand.org/t/auto-queues-not-changing-when-using-auto-accounts-if-account-names-contain-underscores/4924>\
**Category:** Get Help\
**Created:** [July 10, 2026, 2:10pm UTC](https://discourse.openondemand.org/t/auto-queues-not-changing-when-using-auto-accounts-if-account-names-contain-underscores/4924 "2026-07-10T14:10:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cpearse](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/cpearse/32/3465_2.png) [@cpearse](https://discourse.openondemand.org/u/cpearse)\
**Post date:** [July 10, 2026, 2:10pm UTC](https://discourse.openondemand.org/t/auto-queues-not-changing-when-using-auto-accounts-if-account-names-contain-underscores/4924/1 "2026-07-10T14:10:50Z")

</div>

Hello,

We fairly recently upgraded from OOD 3 to 4.1.6.

We use `auto_accounts` and `auto_queues` and on OOD v3 this worked just fine. Our account names contain merely lowercase letters and underscores.

Since the upgrade to 4.1.6, changing account in the `auto_accounts` box no longer adjusts `auto_queues` to show the partitions defined via `AllowAccounts` for that partition in `slurm.conf` if the user is in more than one account containing underscores (when they are in just one it does work). I.e.:

- User is in `account` and `account_one` - fine, partitions with `AllowAccounts=account_one` appear when selecting `account_one`, and disappear again when selecting `account`

- User is in `account`, `account_one` and `account_two` - partitions don’t dynamically adjust, not for `account_one` or `account_two` - only those partitions for `account` appear, nothing changes when you select either `account_one` or `account_two`

1. `data-alias`

> **[data-alias - v4.1 Release Notes — Open OnDemand 4.1.0 documentation](https://osc.github.io/ood-documentation/release-4.1/release-notes/v4.1-release-notes.html#new-data-alias-directive)**
>
> Open OnDemand now offers the bc\_num\_nodes smart attribute, which allows you to request nodes consistently across schedulers. This replaces the bc\_num\_slots smart attribute, which selected either nodes or cores depending on the scheduler. For more...

> **[Dynamic Form Widgets — Open OnDemand 4.1.0 documentation](https://osc.github.io/ood-documentation/release-4.1/how-tos/app-development/interactive/dynamic-form-widgets.html#data-alias)**
>
> Since the option-for and exclusive-option-for directives above require you to place the conditional value inside the directive itself, you can encounter issues if the value contains special characters and cannot easily be changed. data-alias fills...

Perhaps useful when using custom defined dropdowns, but as far as I’m aware not _that_ useful here. In fact, using the F12 inspector on 4.1.6 we can see that automatically `data-alias-account2` appears to be set but isn’t working.

1. “[Automatic Attributes Support Accounts with Special Characters](https://osc.github.io/ood-documentation/release-4.1/release-notes/v4.1-release-notes.html#automatic-attributes-support-accounts-with-special-characters)”

2. This PR: [Normalize dynamic batch connect tokens with underscores (#4251) by bstepanovski · Pull Request #5462 · OSC/ondemand · GitHub](https://github.com/OSC/ondemand/pull/5462)

We’ve tried updating to the latest v4.2.3 on a test box and the issue remains.

Note, if we change the account names to remove all underscores so they are simply purely lowercase letters, the issue is resolved. That’s easy to test, but much harder to deploy in production, as there is a tranche of documentation etc. for our facility based around the account names with underscores.

Our hunch is that this is considered fixed but tests only have scope for cluster names containing underscores?

---

<div class="post-metadata">

**Author:** ![bsingleton](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/bsingleton/32/3343_2.png) [@bsingleton](https://discourse.openondemand.org/u/bsingleton)\
**Post date:** [July 10, 2026, 7:23pm UTC](https://discourse.openondemand.org/t/auto-queues-not-changing-when-using-auto-accounts-if-account-names-contain-underscores/4924/2 "2026-07-10T19:23:07Z")

</div>

Hi and welcome!

It definitely sounds like you have identified a gap in the current testing, would you mind sharing the relevant lines from `sacctmgr -nP show users withassoc format=account,qos where user=<USER> cluster=<CLUSTER>` and `scontrol show part -o -M <CLUSTER>`? You can see the test fixtures that we added as part of the data alias feature in [Allow special characters in auto\_accounts by adding data-alias by Bubballoo3 · Pull Request #4673 · OSC/ondemand · GitHub](https://github.com/OSC/ondemand/pull/4673/changes#diff-899a5c7bbfc1f8e0f9e1ccb4388b2504a141b92c09de8c8dd5dfd3b1df44096f) to get an idea of what we would need.

It sounds like the situation you describe is absolutely one we would like to support, and while the tests do include multiple accounts with special characters, there is only one with an underscore, so that may be the missing piece. Once we have your output from sacctmgr and scontrol, that should allow us to replicate the bug and eventually add it into the fixtures to ensure it stays fixed.

Thanks so much for alerting us to this!

---

<div class="post-metadata">

**Author:** ![cpearse](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/cpearse/32/3465_2.png) [@cpearse](https://discourse.openondemand.org/u/cpearse)\
**Post date:** [July 10, 2026, 7:50pm UTC](https://discourse.openondemand.org/t/auto-queues-not-changing-when-using-auto-accounts-if-account-names-contain-underscores/4924/3 "2026-07-10T19:50:43Z")

</div>

Hi Braeden,

Hopefully this is enough…

Example of affected account (redacted to exemplar UID, cluster name etc. but in the same format):

```bash
$ sacctmgr -nP show users withassoc format=account,qos where user=ab123456 cluster=cluster
pilot|normal,ood
pilot_gpu|normal,ood
pilot_vip_gpu|normal,ood

$ scontrol show part -o -M cluster
PartitionName=gpu AllowGroups=ALL AllowAccounts=pilot_gpu,sys-admins (etc.)
...
PartitionName=vip AllowGroups=ALL AllowAccounts=pilot_vip_gpu,sys-admins (etc.)

```

If it helps, an unaffected account would be in _just_ the `pilot` account or `pilot` and _one_ of `pilot_gpu` _or_ `pilot_vip_gpu`; affected accounts are in `pilot` and two or more partitions containing underscores. The `sys-admins` Slurm account is in `AllowAccounts` for all partitions so our admin team can submit to any partition for testing etc. Users are scoped to a limited number of accounts that match to accompanying partitions. All partitions are named using just lowercase, no spaces or special characters.

Hope that’s enough?

---

<div class="post-metadata">

**Author:** ![bsingleton](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/bsingleton/32/3343_2.png) [@bsingleton](https://discourse.openondemand.org/u/bsingleton)\
**Post date:** [July 13, 2026, 8:15pm UTC](https://discourse.openondemand.org/t/auto-queues-not-changing-when-using-auto-accounts-if-account-names-contain-underscores/4924/4 "2026-07-13T20:15:16Z")

</div>

That was enough for me to replicate the issue! Interestingly enough, it works fine on latest but not either of the recent releases (4.1.6 or 4.2.3). It appears to just be the auto\_queues widget that is broken, the correct HTML for the select widget should be

```auto
<select class="form-select" name="batch_connect_session_context[auto_queues]" id="batch_connect_session_context_auto_queues">
    <option data-option-for-auto-accounts-pilot="false" data-alias-account0="pilot_vip_gpu" data-option-for-auto-accounts-account0="false" value="gpu" style="">gpu</option>
    <option data-option-for-auto-accounts-pilot="false" data-alias-account1="pilot_gpu" data-option-for-auto-accounts-account1="false" value="vip" style="display: none;" disabled="">vip</option>
</select>

```

But, as you note, the buggy HTML sets both aliases as account2 and breaks

```auto
<select class="form-select" name="batch_connect_session_context[auto_queues]" id="batch_connect_session_context_auto_queues">
    <option data-option-for-auto-accounts-pilot="false" data-alias-account2="pilot_vip_gpu" data-option-for-auto-accounts-account2="false" value="gpu" disabled="" style="display: none;">gpu</option>
    <option data-option-for-auto-accounts-pilot="false" data-alias-account2="pilot_gpu" data-option-for-auto-accounts-account2="false" value="vip" disabled="" style="display: none;">vip</option>
</select>

```

The fact that this is working on master means that the solution is certainly within reach, it must have been fixed by something that was not explicitly a bug fix and so was not backported. Now that we are aware of it though, you can expect it to be fixed in the next round of patches coming in September.

In the meantime, you could use the data-alias feature to define a global attribute to fill the gap. Something like

```auto
global_bc_form_items:
  global_auto_queues:
    widget: select
    options:
      - ['gpu', 'gpu', data-alias-account0: "pilot_vip_gpu", data-option-for-auto-accounts-account0: "false"]
      - ['vip', 'vip', data-alias-account1: "pilot_gpu", data-option-for-auto-accounts-account1: "false"]

```

in your ondemand.yml file. That at least lets you keep a single definition for your shim, but does not get around having to update each app to use the new form item. I would be happy to answer any questions or provide any help with that if you would like! I’ve also created [auto\_queues generates invalid data-alias HTML with multiple accounts with underscores · Issue #5615 · OSC/ondemand · GitHub](https://github.com/OSC/ondemand/issues/5615) to track this going forward. Thanks so much for bringing this to our attention!
