Page MenuHomePhabricator

New custom type field: Project Tags
Closed, ResolvedPublic

Description

  • The problem is that I couldn't find a good way to describe in the bug form, the version of the product where that bug was found.
  • We develop several products and maintain several versions of each one.
  • Now, we are using tags to describe the product and milestone where the bug was corrected (the same for new features) so we cannot use that field to identify where the bug was found.
  • I know we can create a custom field for that, but to avoid human error, is not a good idea to be a text field and also not a good idea to be a select field because as I said before, we have multiple products and each product has different versions (even different version numbering).
  • My idea (if you consider it useful) would be to allow to create a new field type called "Tags field" or similar. So in my application I could create a new field called "Found In" and assign one or even múltiple tags from different products! (many times the same bug is found in multiple products and milestones because of the shared code).
  • Of course it would be great to allow to search also by that field...
  • I suppose many people will have this problem so would be great if you can do something here.

Event Timeline

avivey claimed this task.
avivey added a subscriber: avivey.

Custom fields already support select type, and also allows searching by it:

maniphest.custom-field-definitions
{
	"company.foundin": {
		"name": "Found In",
		"type": "select",
		"search": true,
		"options": ["version 1", "version 2"]
	}
}

search interface:

pasted_file (99×266 px, 4 KB)

I know I can create a custom field with the select type, but the problem is that I have 10 different products (project tags) and each one has 100 milestones (2.0.1, 2.0.2, ...). You can imagine why I can not use select for this...

Also I would like to guide the people who fill the bug so it should only show the released versions of each product (milestones).

avivey renamed this task from New maniphest type field to select tags to New custom type field: Project Tags.Feb 7 2017, 2:01 PM
avivey reopened this task as Open.
avivey removed avivey as the assignee of this task.
avivey edited projects, added Custom Fields; removed Maniphest.

I don't think the upstream should provide this yet. You're already able to write your own custom field and since it's your code and your rules, will be 10x better for your users. Mostly, we need to abstract out other similar top level problems (input that drives an input?) and devise a single solution that may or may not perfectly fit your needs. It also might take years.

Does datasource work? I've never tried it personally, but seems to be what you're asking for.
https://secure.phabricator.com/book/phabricator/article/custom_fields/

Datasource: Controls with type datasource allow selection of tokens from an arbitrary datasource, controlled with datasource.class and datasource.parameters.

Yes! It worked! Thanks!!!

I didn't understand the meaning of that field and its usage.

I had to dig a bit in the code to get the class but its working perfect!.

Now I can assign to a bug milestiones where the bug was found so I can search and have all the information clear.

I used this:

"mycompany:FoundInVersion": {
  "name": "Found In Version",
  "search": true,
  "type": "datasource",
  "datasource.class": "PhabricatorProjectDatasource"
}

I would suggest to include this sample in the documentation to help other people to use that powerful field. If I can change it for you, just say it.

I think we had some misunderstandings in the begining...

Thanks again.

chad claimed this task.

Great! Glad that worked out. I think the documentation is good enough given it's description. We'll keep an eye on it.

Just a question - are there any technical reasons why providing custom field for "projects" may not be a good idea?