Skip to content

Support changemaker association on proposal creation #1794

@slifty

Description

@slifty

Right now in order to associate a changemaker with a proposal a client needs to create the proposal and THEN create that association. This means multiple calls, that if an association will fail then you might have a proposal without its association / end in only part of the intended state. It also means that a client needs permission to perform both actions, which is complex given that we don't have the ability to grant specific permissions against specific proposals right now.

Given all this, I'd like to suggest we allow clients to specify associated changemakers as part of a POST /proposals call. We have something like this already for POST /proposalVersions since we allow clients to provide all of the relevant field values in a proposal.

This is reasonable, as Changemaker associations are many-to-many but arguably they are an attribute of the proposal itself and it makes sense that a user should be able to specify the association as part of the initial creation. This has an added benefit of assisting with our permission structure.

As part of this we might reflect on whether this means that the concept of a ChangemakerProposal should be removed from the API / updating that relationship should be purely via REST. I'd encourage us to think of that as a separate issue from this, however.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions