Remove asset status + refactor how assets and plans are archived#986
Remove asset status + refactor how assets and plans are archived#986mstenta merged 25 commits intofarmOS:4.xfrom
Conversation
86b71fa to
a846b56
Compare
a846b56 to
7576146
Compare
|
Notes from dev call:
|
Re: the status options for |
In my mind, a status of "planning" means that the plan is in the process of being built. A status of "planned" would imply that the planning process is done, so it would be different from "planning". I could see that being useful, perhaps, in some situations, but probably isn't necessary in the default set of statuses we provide out of the box. If a custom planning module needs that level of granularity for its workflow then it can provide that. |
paul121
left a comment
There was a problem hiding this comment.
I did not test locally, but this all LGTM. Great changes, hope this simplifies things going forward
| assert($entity->get('status')->first() instanceof StateItemInterface); | ||
| // Load new and original archived state to see if it is changed. | ||
| $archived = $entity->get('archived')->value; | ||
| $original_archived = $entity->original->get('archived')->value; |
It only represents log columns in one of the three places it is implemented. The other two are asset columns and term columns. This simply generalizes it to $columns in all three.
Performs the following steps: - Install the new last_archived field. - Populate last_archived field values from the old archived field. - Delete the old archived field. - Install the new boolean archived field. - Archive assets with a status of archived. - Rename asset_activate_action action configuration entity to asset_unarchive_action. - Delete the status field.
I tested this, and the default status is |
7576146 to
46a1734
Compare
@see PR: Remove asset status + refactor how assets and plans are archived farmOS#986
This matches the changes made in PR: Remove asset status + refactor how assets and plans are archived farmOS#986
@see PR: Remove asset status + refactor how assets and plans are archived farmOS#986
This matches the changes made in PR: Remove asset status + refactor how assets and plans are archived farmOS#986
@see PR: Remove asset status + refactor how assets and plans are archived farmOS#986
This matches the changes made in PR: Remove asset status + refactor how assets and plans are archived farmOS#986
@see PR: Remove asset status + refactor how assets and plans are archived farmOS#986
This matches the changes made in PR: Remove asset status + refactor how assets and plans are archived farmOS#986
See farmOS#986 This is necessary because farm_update will no longer revert these automatically.
See farmOS#986 This is necessary because farm_update will no longer revert these automatically.
See farmOS#986 This is necessary because farm_update will no longer revert these automatically.
See farmOS#986 This is necessary because farm_update will no longer revert these automatically.
… hook_views_data_alter(). Organization entities do not have a status field. They did in the early implementation of the branch that added organization entities, but that was removed when the status field was removed from asset entities. So this is just cleaning up lines that should have been removed at that point. @see #986
This dependency is no longer necessary since the status field was removed from assets. See farmOS#986
This should have been done in #986
This is a followup to #978, as described in https://farmos.discourse.group/t/proposal-remove-status-field-from-assets-and-plans/2319
This is a breaking change to the farmOS data model's
assetandplanentity types. Here is a quick overview of what this does:archivedfield onassetandplanentities to indicate whether or not the entity is "archived" (not shown in the UI by default).archivedstatus option from theplanentitystatusfield's default state machine workflow.planning,done, andabandonedstatus options to theplanentitystatusfield's default state machine workflow. This accomplishes two goals:archivedstatus, leaving on theactivestatus remaining.statusfield fromassetentities.See the forum topic linked above for the full context and discussion.