getTotalAvailableSize broken on Browse object in 8.1.20?

Just upgraded one of my systems to 8.1.20 and some of our scripts that use system.tag.browse started misbehaving. Narrowed it down to this snippet:

tag_root = '[default]TopFolder'
browse_results = system.tag.browse(tag_root, {'recursive':True})
partial_results = (browse_results.getReturnedSize() != browse_results.getTotalAvailableSize())

Some quick testing in the Designer script console is showing that getTotalAvailableSize is always returning 0, even when we got results.

Is the concept of partial results deprecated, or is this a regression bug?

I think this might be a regression introduced in the Tag Status Report Tool work… let me ask around.

What version did you upgrade from?

I was coming from 8.1.17.

Any comment on whether this is a real bug or if something else was going on?

Just upgraded to 8.1.21 and this issue still exists on that version.

Hi justin.brzozoski,

I would recommend opening a ticket with the Support Department. This way you can get a direct update regarding the status/whether this indeed a bug.

I did open a support ticket and this was the final conclusion:

There likely were some changes to the source code that lead to the change in the behavior as a result of adding the Tag Report Tool in 8.1.19.

However, it seems that in both cases the function is/was likely not returning the expected value at any point, even pre-8.1.19.

In general, the getTotalAvailableSize is more intended to be used with the system.tag.query function in general. With .query you can specify a limit (i.e. find the first 10 tags) which returns a continuation point (next tag that would have been checked), which then can be used to continue querying past the limit. system.tag.browse doesn't allow you to pass in a limit parameter, and is just going to return the entirety of the results every time. getTotalAvailableSize in theory would just return the same as getReturnedSize .

Should be noted that the function is also not returning anything particularly useful with system.tag.query as of right now either. The only reference I can find to it in the user manual is this brief snippet here which isn't very explicit, but we'll likely remove that reference as well Scripting Object Reference - Ignition User Manual 8.1 - Ignition Documentation.

In short, It did change as a result of adding the Tag Report Tool in 8.1.19, but likely wasn't working the way you would expect it to or in a particularly useful way before then when used with system.tag.browse.