Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

[WIP] Send nags to product owners #21

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

[WIP] Send nags to product owners #21

wants to merge 8 commits into from

Conversation

toolness
Copy link
Contributor

@toolness toolness commented Jun 23, 2017

This fixes #3.

To do (some of these can be spun off into separate issues, maybe):

  • Add last_nagged_at and next_nag_at fields to Report and set them accordingly on model save.
  • Verify that nagging only for non-closed reports that are eligible for bounty is actually the behavior we want.
  • Sync structured-scope's asset_identifier and asset_type fields with the Report model.
  • Figure out how to map structured scopes to product owners and implement it.
  • Add support for sending email and/or Slack notifications.
  • Add a setting that allows a default admin to be contacted if a product owner can't be found.
  • Add a manage.py nag command that notifies everyone needing a nag.
  • Run manage.py nag as part of manage.py runscheduler.

@toolness
Copy link
Contributor Author

Jacob mentioned in a call that storing the mapping from asset type/identifier to "person to nag" can be done in a YAML file. Is it OK for this file to be public along w/ the rest of this reposiory, or would doing this imply that the repository go private?

@toolness
Copy link
Contributor Author

Ended up deciding that it's probably best to store the mapping info in a model(s) rather than a YAML file, so I'll do that.

@toolness
Copy link
Contributor Author

So I'm running into some issues w/ structured scopes... I thought Alex said in our last meeting that they were immutable--or at least their asset type and identifier were--but from the admin UI it seems only their asset type is immutable.

When I change the asset identifier in the admin UI, this doesn't trigger any changes in the last_activity_at timestamps of the reports associated with the scope/asset, so the h1sync command, which filters based on last_activity_at doesn't actually capture changes to the scope's identifier. (The same thing goes for eligible_for_bounty, the other scope-related field we're interested in.)

I might be able to work around this if there were some endpoint I could ping to just get a list of all structured scopes for a program, but there doesn't seem to be--the /programs/ endpoint doesn't seem to provide the structured_scope relationship, and the only other documented endpoint, /me/ doesn't either.

One solution might be to simply sync all reports every time we sync, rather than filtering by last_activity_at. This might not be a big deal if the number of reports stays fairly low.

Another solution might be to still sync with last_activity_at, but expect admins to manually re-sync all reports whenever a change occurs to a pre-existing scope. Or we could sync all reports at a lower frequency, e.g. daily, so that it doesn't bog things down.

@toolness
Copy link
Contributor Author

Ok, I've just merged everything in this PR so far except for the most recent commit (c223f0a) into master, just because it's all tested and I don't want to have to deal with massive merge conflicts down the line as I put this WIP PR on hold for a bit.

@toolness
Copy link
Contributor Author

This PR is essentially being blocked by #31 (which is just #21 (comment) turned into an issue).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add automatic notification of owners for 90-day SLA
1 participant