Tags on petitions

After Serve petitions data from the forums by nylen · Pull Request #33 · ClassicPress/ClassicPress-APIs · GitHub the logic for displaying a petition in the ClassicPress dashboard is as follows:

  • If the petition has the pull-request or cp-research-plugin tag(s) then it is marked as started in the ClassicPress dashboard. Since some petitions have been closed once they get to this state, it doesn’t matter if the petition’s thread here on the forums is closed, it will still appear.
  • Otherwise, if the petition has the planned tag then it is marked as planned in the ClassicPress dashboard. Since some petitions have been closed once they get to this state, it doesn’t matter if the petition’s thread is closed, it will still appear.
  • Otherwise, the petition’s thread has to be open for replies here, and then it will appear as a normal open petition in the ClassicPress dashboard.

This seems to be working well enough so far. Under this logic, the open and declined tags that are sometimes applied to petitions are unnecessary, therefore I propose to remove them. We can know that a petition is open if its thread is open, and we can know that a petition was declined if it was closed without having one of the aforementioned tags added.

(Side note: The ClassicPress dashboard is currently not set up to show completed petitions in any way. This could be added but would require changes to both the API endpoint and to ClassicPress itself, as well as making sure that all completed petitions have a tag like completed.)

5 Likes

Maybe the most important thing to do is closing petitions (in 6 days?) with declined tag to remove them from the dashboard.
If it’s OK I can go on with this…

4 Likes

I like that idea. They could be marked as declined here on the forums and then they would auto-close in a week, per usual.

Is there any good reason to continue to push declined petitions into dashboards for the additional time, though? I’d just not return declined items in the feed (regardless of whether the forum post had been closed or not.)

1 Like

Let me see if I can find a way to exclude petitions that are already marked to close but haven’t closed yet. If that information is present in the API then maybe we don’t need the declined tag for that purpose either.

For me, the idea of removing these tags is to remove duplicate information and decrease the number of manual steps required to maintain the petitions. If the tags still serve some purpose then we should keep them, but it seems like the open tag can definitely be removed.

2 Likes

There’s no indication in the forums API response that a petition has been set to close, so we should keep the declined tag to be able to exclude these petitions from the dashboard (which will be done by this PR). It may also come in handy if we end up looking at closed petitions, as a way to quickly determine/filter why they were closed.

3 Likes

I have removed the open tag, as discussed above, it serves no purpose. If a thread is open then it is open.

I don’t see the need for further changes at this time. Closing this thread.

2 Likes