system.util.queryStatus doesn't return AlarmQueryResult

From the docs we're told that system.util.queryStatus() returns AlarmQueryResult see here

When I run it in the design console I get this:

#Pull all alarms
alarms = system.alarm.queryStatus(state=["ActiveUnacked", "ActiveAcked"], source=["*AJAX Alarm*"])
type(alarms)
alarms.getDataset()

# I get this
>>> 
<type 'java.util.Collections$UnmodifiableRandomAccessList'> # not AlarmQueryResult!!!
Traceback (most recent call last):
  File "<input>", line 4, in <module>
AttributeError: 'java.util.Collections$UnmodifiableRandomAccessList' object has no attribute 'getDataset'
>>>

Am I missing something? I need to turn the alarms into a dataset

I'm on 8.3.1

This is a bug caused by some "under the hood" changes from 8.3. We're tracking it internally at a fairly high priority - it'll likely be fixed in 8.3.4 or shortly therafter.

In the meantime, you could try this as a workaround:

from com.inductiveautomation.ignition.common.alarming.query import AlarmQueryResultImpl

alarms = system.alarm.queryStatus(state=["ActiveUnacked", "ActiveAcked"], source=["*AJAX Alarm*"])
AlarmQueryResultImpl.buildFrom(alarms)
ds = alarms.getDataset()
1 Like