Keywords for Future Status assets


(Tim Davison) #1

Anyone know if there are any keywords for future status assets?  And if so, what they are?

 

What I'm trying to:

I have a site admin/publishing dashboard that lists all the assets across all our sites that are ready to go live.  Comes back as a table, each asset on it's own row.  All good.

 

We use future statuses a lot to schedule when things will go live.  What I've done is set up a nested lookup that gets the future statuses (if any) applied to the current listed asset, and pops the results into the row for that asset.  This is working fine, I'm getting the future statuses back no problem.

 

The issue is all I can get from keywords for future statuses is their name, so they all look like "Future Asset Status Cron Job" - all the same.  What I'd like to list, as a minimum, is:

  • What status is it going to be changed to
  • When the status will change

But I don't know what keywords to use (or if they are even available).

 

Cheers

 


(Bart Banda) #2

AFAIK there aren't any keywords that can get you this information. Your next best bet is to try and get it with the JS API GetAttributes function to see what it returns and then potentially expose some information that way. 


(Tim Davison) #3

Interesting, if I try getAttributes on a Future Status asset using JSAPI I initially got the following in the JSON response:

{"error":"You do not have permissions to access this asset"}

Which is what I'd typically expect if I haven't set up the roots in the JSAPI correctly.  So I added the System Management > Cron Manager asset (#16 in our install - may be the same in others, it's one of the core assets created) to the root assets of the Javascript API asset I'm using and *viola* now get the following returned:

{"type":"one_off","when":"OO=2014-04-30 16:09","running_as":"12","read_only":"0","long":"0","running":"0","status":"32","dependants_only":"1"}

Which is pretty much all the info we wanted.  Now to do some date parsing, figuring out status codes, integrate it into the page, etc, but I think that's a win.


(Nic Hubbard) #4

Here are the status codes:

 

  • Archived 1
  • Under Construction 2
  • Pending Approval 4
  • Approved to go Live 8
  • Live 18
  • Up for Review 32
  • Safe Editing 64
  • Safe Editing Pending Approval 128
  • Safe Editing Approved to go Live 256

(Bart Banda) #5

Or for a pretty picture and colours, you can refer to: http://manuals.matrix.squizsuite.net/concepts/chapters/squiz-matrix-concepts#status-values

I have that printed out and pinned to my wall. :)


(Tim Davison) #6

Thanks Nic and Bart.  You just saved me several hours of creating a bunch of future statuses and staring at the output values.  :)