Allow Read Access To "Status" Property of PackageLinks

As a developer, it is currently impossible to accurately acquire information about a package through a script.
My use case for this is making an error message appear if a package is determined to be outdated through the use of accessing the “Status” property. Currently, I have to get around the restriction by using the VersionNumber which becomes tedious when updating the package as the script will then fire if the version number doesn’t match the verison number in the script - even if it’s the most up to date package.

My suggestion is to either A. allow developers to have read-access to the “Status” property, or create a new bool property that announces whether or not the package is up to date, and allow developers to have Read-Access to it.

6 Likes

Duly noted… Can you provide us some more background on what are you trying to do with Packages via scripting and the context in which you want the out-of-date error message to appear?

1 Like

Right here.
image

Under “Link” in the properties panel, I’m suggestsing that the status property be set to Read-Only instead of Restricted, or add in a read-only bool property.

Currently, I have to do

if pLink.VersionNumber ~= 7 then --Current Method
createWarningMessage()
end

instead of doing

if pLink.Status ~= "Up To Date" then --Read Only Status
createWarningMessage()
end

or a better option would be to have it be

if pLink.UpToDate then --Read Only Bool
--donothing
else
createWarningMessage()
end

The first method can cause a warning message to appear if the version number is higher than the specified number, which is bad. Because even if it’s the most up to date version, places with the Package before the update will still appear as Up To Date, even though they’re actually a version or two behind.

1 Like