Ayon - Marking projects as not active

Is there not a way in Ayon anymore to set a project as not active?

Screenshot 2024-01-19 at 11.40.43 AM

Bonus points if the launcher wouldn’t show the not active projects

1 Like

Talking about active/inactive projects, I noticed that in OP launcher inactive projects were still showing up and realized that is because of this on openpype.client.mongo.entities.py, isn’t that a bug?

The left of these looks good to me.

The project is considered active:

  • if it does not have any active data (so basically if not set it is assumed to default to True)
  • if it has any active data then it must be true

If for an active project you require active key to exist and be True then you are basically saying that projects are inactive by default and only active when explicitly stating they are with active=True. I think defaulting a project to active unless something describes it is not is a more sensible default.

yeah fair but do you see only active projects in the launcher? because without that change I see all projects

In OpenPype we use inactive projects quite a bit - and they are filtered for us, yes. Whether I’ve something customized related to that, not sure - but I don’t think I did.

Anyway, with regards to AYON - you can set a project as inactive. (They do still show in Launcher however, which is a bug). More info on discord here

To mark a project as not active in AYON you need to go to:

  1. Enter a project
  2. Dashboard > Overview
  3. Then right hand side you will see the active state, you can click “EDIT” to edit it.

An Admin user will be able to still see the project (greyed out) int he project lists here and there to customize it.

See the discord discussion for any bugs that I noticed for now (e.g. if all projects are inactive and you have no active project anymore it seems impossible to reach the projects because it shows you a “Create first project” page instead. And it still shows in the Launcher tool. Other than that, it seems all is fine!

interesting yeah, not sure why for me they still show up without that change, I just checked the Mongo DB and the result of that query and while I see active: false on the DB that’s not returned on the call for that project with that query filter (without my change)

    conn = get_project_connection(project_name)
    return conn.find_one(query_filter, _prepare_fields(fields))

the query filters are what causes that data to be returned wrong, if I don’t set any filters on that conn.find_one() function it returns the data as it should so there’s definitely a bug there on my side

I found why, why the fuck do I have two “project” entries on the DB (one of them is the one that contains that data without active and code and it’s what that find_one returns without the query_filters modification?

This really feels like some sort of “Shotgrid” syncing bug that could’ve maybe occurred? Otherwise I’m not sure how you’re generating multiples of those. This is just guessing of course!

Yeah… who knows, I will leave that change on my fork so by default if active isn’t defined it’s marked as unactive as that works for my case better than trying to clean the DB