Prepopulate project issue metadata from $_GET

drumm - July 7, 2009 - 18:52
Project:Project issue tracking
Version:6.x-1.x-dev
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work
Issue tags:needs drupal.org deployment
Description

Form: node_form, issue type only

Fields:
rid
component
category
assigned
sid
title
body

These fields should be fillable from $_GET. #500536: File an issue for this link will use it.

#1

drumm - July 16, 2009 - 07:27
Status:active» needs review

Patch attached.

AttachmentSize
drupalorg_project.diff 3.14 KB

#2

drumm - July 16, 2009 - 07:34

Missed rid.

AttachmentSize
drupalorg_project.diff 3.24 KB

#3

jhodgdon - July 17, 2009 - 15:17

If this is added to drupal.org, would it be possible to add something to the bottom of each Handbook page saying something like:

Is there a problem with this page? If you create and log in to your drupal.org account, you can edit most pages on drupal.org (you should see an Edit tab at the top). If you do not see an Edit tab, or if you can identify the problem but aren't sure how to fix it, you can (link) file an issue(endlink) to bring it to the attention of the documentation team. Thanks!

That could be prefilled with:

Project: Documentation
Component: Correction/Clarification
Category: bug report
Title: Documentation error on [url]
Body: On [url], ... (please describe the problem here)

#4

drumm - July 20, 2009 - 17:40
Component:Code» User interface
Priority:critical» minor
Status:needs review» active

Committed.

Leaving open for #3 to potentially be implemented.

#5

drumm - July 20, 2009 - 17:40
Priority:minor» normal

#6

dww - July 21, 2009 - 22:07
Status:active» needs work

Been out of town a few weeks, just catching up now and saw this. It probably would have been better to be consistent with the GET parameters used in the issue queue views. For example "status" instead of "sid"... Did this get deployed on d.o yet? Are other things making use of it yet?

#7

dww - July 21, 2009 - 22:07

p.s. What a pain in the ass that we added this code in the d.o module instead of just making prepopulate work. *sigh*

#8

drumm - July 21, 2009 - 22:44

"Just making prepopulate work" turned into writing a whole field-level white-listing system. Sorry, I'm not going to invest that sort of time just to get a handful of values from $_GET to #default_value, and I didn't see anyone else volunteering.

#9

drumm - July 21, 2009 - 22:46

The keys can still be changed, do you have a complete list?

#10

dww - July 22, 2009 - 01:28
Project:Drupal.org customizations» Project issue tracking
Version:<none>» 6.x-1.x-dev

The issue view GET args are:

assigned
status (sid)
priorities
categories
component
version (rid)

To be really nice, version should accept the human-readable version number, not the nid of the release node it points to. That'd require a db query, but it's worth it to make the version field actually useful.

"priorities" and "categories" should probably be singular, in fact. I bet I did it that way in a failed attempt to prevent link rot from the old URLs, but they're almost entirely broken, anyway, so I should just switch those. category can be "bug", "task", "support", or "feature". priority is (currently) just an int (1 = critical, 2 = normal, 3 = minor).

status uses an int value.

component is just the human-readable component string.

assigned in the view GET uses a username as the value, but internally, project_issue stores a UID (0 == unassigned).

Now that I see how project_issue-specific this is really getting, perhaps it's best all the way around to just patch project_issue itself for this... Then, at least other users of project* will a) benefit from it and b) have an interest in keeping it working properly and ported in the future, instead of making this only a d.o feature. Then it's slightly more likely to avoid the "we don't see anyone volunteering" syndrome. ;)

#11

drumm - August 1, 2009 - 05:20

#12

drumm - August 18, 2009 - 05:15

Backported the drupalorg patch to DRUPAL-6--1 and updated SVN.

#13

greggles - August 18, 2009 - 12:43

That commit looks incomplete. See attached.

AttachmentSize
512824_drupalorg_project_get_fixup.patch 1.64 KB

#14

drumm - August 18, 2009 - 17:50

Committed geggles's patch to DRUPAL-6--1 asnd HEAD. Moving to SVN now.

 
 

Drupal is a registered trademark of Dries Buytaert.