I can repro this on any Workflow in my 24.4.0 environment. I’ve got 20+ workflows, and on any of them, if I go to Access\Add\Teams<choose team><Select Execute and Approve><Submit>, I get back:
Failed to assign roles properly
Details
POST api/v2/teams/5/roles/ 400
duplicate key value violates unique constraint “one_entry_per_object_permission_and_role” DETAIL: Key (object_id, content_type_id, codename, role_id)=(158, 6, view_workflowjobtemplate, 305) already exists.
When I decide to become clever and Add first the Execute role and then Add the Approve role, I permanently corrupt something in the system such that there are no roles visible in the template. I’ve not found a fix after that. I have to delete and recreate the workflow. Looking at the /api/v2, it seems like the things are there, but they will no longer show up in the GUI.
Right now, to keep people working, I’m having to grant users the Admin role to the Workflows. I really don’t want that. I want them to be able to Execute and Approve them. Any guesses what I could be doing wrong?
This even happens when I copy an existing workflow to experiment or create a new and basically bare workflow.