action=jadecreateorendorseproposal
* Does the entity page exist at all?
* Yes
* Does the target //facet// already have a proposal with the target //labeldata//?
* Yes
* Has the user already endorsed a proposal within the target facet?
* Yes
* Has the user already endorsed the target proposal?
* Yes: update //endorsementcomment// if set & warn `existingproposalnotesnotoverwritten` (comment: `/* jade-updateendorsement */`)
* No: move //endorsement// to target //proposal// & warn `existingproposalnotesnotoverwritten` (comment: `/* jade-moveendorsement */`)
* Is the target //proposal// `preferred`?
* No: warn `endorsingnonpreferredproposal`
* No: create //endorsement// & warn `existingproposalnotesnotoverwritten` (comment: `/* jade-endorseproposal */`)
* Is the target //proposal// `preferred`?
* No: warn `endorsingnonpreferredproposal`
* No
* Has the user already endorsed a proposal within the target facet?
* Yes: create //proposal// and move //endorsement// with updated `endorsementcomment` (comment: `/* jade-createproposalandmoveendorsement */`)
* No: create //proposal// and //endorsement// (comment: `/* jade-createandendorseproposal */`)
* Is the target //proposal// `preferred`? (Note that if any other proposal existed at this time, then "No")
* No: warn `endorsingnonpreferredproposal`
* No: create //proposal// and //endorsement// (comment: `/* jade-createandendorseproposal */`)
1. The entity page doesn't exist at all. (comment: `/* jade-createandendorseproposal */`)
* Create the page, create the relevant proposal
* Add an //endorsement// from the user.
2. The //entity page// exists but //proposal// with matching //labeldata// and the user has not already endorsed a //proposal// for this //facet// (comment: `/* jade-createandendorseproposal */`)
* Create the relevant //proposal//.
* Add an //endorsement// from the user.
* If another proposal exists for the target facet: Raise a `endorsingnonpreferredproposal` warning and leave the //preferred bit// alone
3. The entity page exists and there's a //proposal// with matching //labeldata//. (comment: `/* jade-endorseproposal */`)
* Add an endorsement from the user.
* Raise an `existingproposalnotesnotoverwritten` warning
* If the proposal is not preferred: Raise a `endorsingnonpreferredproposal` warning and leave the //preferred bit alone
4. The user already has an //endorsement// for this //facet// but it is for a different proposal.
A. If the target `labeldata` is not represented in any proposal: Create the proposal (comment: `/* jade-createproposalandmoveendorsement */`)
* Move the user's endorsement to the target proposal and update the `endorsementcomment`.
* If the proposal is not preferred: Raise a `endorsingnonpreferredproposal` warning and leave the preferred bit alone
B. Otherwise, if the target //labeldata// exists, just move the endorsement. (comment: `/* jade-moveendorsement */`)
* Raise an `existingproposalnotesnotoverwritten` warning
* If the proposal is not preferred: Raise a `endorsingnonpreferredproposal` warning and leave the preferred bit alone