Emit browser notification messages when using session_uuid

The ShotgunEvents/AMI service is very powerful, and lets us work around a lot of special studio needs outside of the scope of ShotGrid development. The “green flash”/news loader is nice, it updates the view so it has the latest values.

There are cases where I would like to undo a change a user makes and make sure they know it was undone, and more importantly why it was changed. Currently the only options I have are outside of SG and aren’t delivered in a timely manner. Ie email requires the user checking their email, our google chat messaging bots require subscribing etc.

It would be nice if when committing changes you could optionally add a message and that message would be shown to the user as a desktop notification, or banner message quickly as part of the news loader updates.

A “message” kwarg could be added to the create/update/delete methods, or a with context could be added that handles it similar to this:

with (sg.session_message('You don't have permission use this status.')):
    sg.update(...)  # Reset the status to the original value

This would add a “session_message” property on the created EventLogEntry. the news loader would detect and show the notification to the user. Also, it sounds like the modal AMI’s might need some special consideration to ensure they also show the notification after the page is reloaded.

An example use case. Artists need to be able to set the status of Versions, but they should not be allowed to approve their own versions. They can change between “In Progress”, “Pending Approval”. The supervisor can then change the version status to Approved when they look at the Pending Approval versions. Currently ShotGrid doesn’t support something like this, and adding separate columns for this type of workflow is cumbersome and hard to explain.

Not sure I’m completely understanding what your use case is and what you are aiming to see.

When a Status for a Version is changed the artist is usually notified and can receive desktop notifications from the browser as well.

  1. Is the person who made the change notified, or someone assigned to it? In the version example the user assigned to it wouldn’t really need to be notified as the change was undone.
  2. Do they need to be following that Entity to be notified?
  3. Is that fast enough that if they are making similar changes they won’t end up making the same mistake multiple times(ignoring multi-edit)?
  4. Is there any info on the existing desktop notifications and when and how they are delivered? I had not even enabled desktop notifications on my computer as I never go to the inbox.

The goal of this is to notify the user making the changes in a timely manner, that there is a problem. The version example is just an example of a change that might need undone, ideally this would work for all entity types and views in ShotGrid.

For your example here, ShotGrid supports this kind of stuff natively.
You can define which permission group can change the status of an entity record (i.e. a version) from which status to which.

Right click on the Status Field on the Versions page and navigate to permissions, open the dropdowns and start editing the configuration based on your permissions roles.

That’s a nice bespoke feature that I was not aware of and likely will start using. However I’m not looking to solve just that example issue, I’m presenting a simple generalized way it could be addressed for all data types not just status lists.

I did run into a use case today, and if there is a pre-existing solution I would love to know about it, but what I’m suggesting would allow it.

What I could really use is row level edit permissions. Afik that is not currently a thing so this provides a way to accomplish it and similar studio specific requirements.

Desired goal: Once the Payroll Processed column is checked on a TimeLog, users should not be able to edit that TimeLog at all. SG doesn’t let me prevent editing of a column that a user needs edit permissions for, so I need a way to undo that users edit and make sure they know that it was undone as soon as possible so they can edit the correct record.

In our SG we have a Payroll Processed checkbox column that only accountants can edit. This makes it so if an artist duplicates a processed record the new record doesn’t get that column checked. However it is difficult to tell which record is the duplicate so they may accidentally edit the original one. Ideally we can avoid relying only on user education requirements like formatting rules and telling the user to look at the Payroll Processed column to see what you can edit etc.

Implementation: What I’m suggesting above could be used to solve this. Importantly it lets me notify the user while they are thinking about it and not hours later when they check their email or even worse, never get notified at all because they filter those emails into the trash.

A ShotgunEvent would monitor for TimeLog changes and check if Payroll Processed is checked. If it is it would undo the change and notify the user that they can’t edit this record. Think of it as providing a way to show a custom Message Box to the user about a change that was made for them.

For displaying a custom messagebox, I would say, add it to the roadmap by going here:

https://shotgridsoftware.com/roadmap/

Seems usefull enough.

For events, you should be looking at the Event Daemon:

or Webhooks:

And finally, you could ask SG support to add a conditional permission to the permission group of your choice so that, for example, an artistn cannot change a timelog if the payrol processed field is ticked. This is possible through conditional permissions.

To create a support ticket, go here:

Contact Customer Support | Autodesk Knowledge Network