Adding this to the d.o issue queue as I thought it was more of a custom workflow for d.o rather than a generic thing other sites would want.

I constantly come across issues with incorrect priorities and statuses:

  • Support requests marked Major or Critical.
  • Issues with no patch marked "needs work" or "needs review".
  • Issues with a patch marked "active".

I suggest automating some of these based on standard d.o workflows:

  • If a file is attached with a name ending in ".patch" then the status should automatically be set to "needs review".
  • If no file is added to the issue and the category is either "bug report" or "feature request" then it should not allow the status to be set to "needs review".
  • If the category is "support request" then the the priority should be set to "normal".

These should happen both when the issue is first created or when a comment is posted.

CommentFileSizeAuthor
#11 drupalorg-n2402023-11.patch1.17 KBDamienMcKenna
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DamienMcKenna’s picture

Status: Active » Closed (duplicate)
DamienMcKenna’s picture

Status: Closed (duplicate) » Active

Re-opening this as the other issue doesn't cover the intended automated workflow.

DamienMcKenna’s picture

drumm’s picture

Issue tags: +D.o UX
YesCT’s picture

automating some validation with this seems like a good idea. would also be good to have a validation error message link to a help page
there seem to be three relevant ones.

https://www.drupal.org/node/156119
https://www.drupal.org/core/issue-priority
https://www.drupal.org/core/issue-category

joachim’s picture

Good idea!

Not sure about this one though:

> If no file is added to the issue and the category is either "bug report" or "feature request" then it should not allow the status to be set to "needs review".

That won't work for issues that are about policies. Though those nearly always have their title prefixed with '[policy, no patch]', so I suppose we could detect that.

DamienMcKenna’s picture

@joachim: Wouldn't a META or POLICY issue be a task?

joachim’s picture

Metas can be bugs. But policy is usually tasks, yes. A search should confirm that ;)

DamienMcKenna’s picture

Now that we have "plan" issues, the workflows would need to be tweaked a little.

joshuami’s picture

Issue tags: +d.o issue workflow
DamienMcKenna’s picture

Status: Active » Needs review
FileSize
1.17 KB

I received another critical support request this morning. Gah.

This would force the priority for support issues to be 'normal' or 'minor'. It's untested, but the PHP code at least validates ;-)

mglaman’s picture

If a file is attached with a name ending in ".patch" then the status should automatically be set to "needs review".

Often times I see WIP patches posted as Needs Work. I do this a lot. Just because there is a patch may not mean it's quite ready for review.

Or would this only trigger if the status was left at "actice"

On phone, didn't review patch to see

joelpittet’s picture

@mglaman I agree. Could that be a soft automation with JS?

Pseudo code:
if (status != 'needs review' && has_new_patch_file) {
return confirm('It looks like you forgot to set the status, did you want to save anyway?');
}

joachim’s picture

Or better still:

It looks like you're attaching a patch, but you haven't set the status. Do you want to set it now?

[Set status to Needs Review] [Leave status as $current]