This PR adds an option to the OrganisationParent (NHS Trusts or GP Practices)
model, active that allows us to mark them as being, er, active or not. Active
parents are those that are still engaged with CitizenConnect and want to
receive new problems, e.g. as of now, all of them. Soon however, some trusts
want to leave, but they don't want to delete their profile from the site
completely. They may have existing problems still to close, or just want to
keep their record of problems available to view.
I've added a new field to record this status, as well as a new queryset setup
to make it easy to search in and find organisations who's parent is active.
Currently finding an organisation to report a problem to is controlled by a
special ListView subclass and a form object that backs it to do the actual
searching. I've updated this form to accept the queryset from the ListView and
updated the search view for problem-creating to set this queryset to only
active organisations.
The problem creating form itself takes an organisation parameter which a mixin
helps turn into an organisation object. I've subclassed this to only look at
active organisations too.
Note: this purposely doesn't affect the equivalent search for review creating
nor the generic organisation finding form, because I see no harm in leaving
those working for all organisations regardless.
This PR adds an option to the OrganisationParent (NHS Trusts or GP Practices) model,
active
that allows us to mark them as being, er, active or not. Active parents are those that are still engaged with CitizenConnect and want to receive new problems, e.g. as of now, all of them. Soon however, some trusts want to leave, but they don't want to delete their profile from the site completely. They may have existing problems still to close, or just want to keep their record of problems available to view.I've added a new field to record this status, as well as a new queryset setup to make it easy to search in and find organisations who's parent is active. Currently finding an organisation to report a problem to is controlled by a special ListView subclass and a form object that backs it to do the actual searching. I've updated this form to accept the queryset from the ListView and updated the search view for problem-creating to set this queryset to only active organisations.
The problem creating form itself takes an organisation parameter which a mixin helps turn into an organisation object. I've subclassed this to only look at active organisations too.
Note: this purposely doesn't affect the equivalent search for review creating nor the generic organisation finding form, because I see no harm in leaving those working for all organisations regardless.
Closes #1310