• Status Planned
  • Percent Complete
  • Task Type Feature Request
  • Category Backend/Core
  • Assigned To No-one
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version 1.0 devel (github master)
  • Due in Version 2.0
  • Due Date Undecided
  • Votes 3
  • Private
Attached to Project: Flyspray
Opened by tharibo - 27.11.2012
Last edited by peterdd - 01.10.2015

FS#1782 - Custom fields on task

A very useful feature would be to be able to manage a list of custom fields by project, and to be able to add and fill any of these fields to any task.
So we could be able to search on the presence and content of a field.
We could be able to sort the tasks by this field when they are displayed in a list.

A use example is when you create a bug by reference to another external list. It can be very useful to have a field that references a line in the external list.


We are now doing tags where a user can add tags to a ticket. therefore is this still needed?

Great for tags.
Custom fields are an other useful feature for bugtrackers, which is why I proposed it.
Anyway, I don't use Flyspray at the moment, so don't feel like you *have* to do it soon.

These two lacking features (tags and custom fields) prevented me for doing any more evaluation of your product because I needed them two.


Tags will be in 1.0. The question is if we also need custom fields. What would be a use case of when you would want to use a custom field instead of tags?


A custom field may be of a given type : bool, numerical, string. It can also be a value selected in a list of possible values (combo box). I want to be able to sort/filter the bug list with using any of the custom fields, as any field of the bug list.

A tag is just affected to some bugs. A given bug may have multiple tags.

My personal use case was to add a lot of information around my bugs, information which is provided by my customer in Excel.

Maybe you can have a look at some other bugtracker already implementing this kind of feature to have an idea of what is good and what is not.


Go it. Makes sense. It will be some time before we implement it but it will get done eventually.

xcdam commented on 25.03.2015 13:25

I've started this part :
1) new settings put in the menu settings's project
2) create tables fits to this process.

Project Manager

Hello Damien,

I see at least 3 possible ways to add a custom fields feature to flyspray. All that must be well thought and planned for later versions.

But you can always sign up on and fork flyspray and do your own branch implementing your idea of custom fields.
So we all can see and discuss about it.

You are welcome.

xcdam commented on 26.03.2015 12:42

Hello Peter,
Thanks. I'll try to continue this next week

xcdam commented on 16.04.2015 15:28

Hi Peter,

I try to push my own branch (fork flyspray before ) and i have this error

Can't connect to any repository: ( Error writing request body to server)

What should i do and (or not do !)


xcdam commented on 29.04.2015 14:36

Hello Peter,

I've started this folder.
branch "FS2.0-CUSTOMS-FIELDS" finally created ,

waiting for your feedback :)

Project Manager

tharibo wrote: A use example is when you create a bug by reference to another external list. It can be very useful to have a field that references a line in the external list.

I think this can be done with the "Add Link" at task creation.

Tags can be used for free text labeling tasks. (work on simple tags add/remove is in progress for FS1.0)

A full customs fields support requires dynamic database scheme changes. An idea how to do it without losing Flyspray database upgradability exists, but not for FS1.0.

My branch for custom fields:

xcdam commented on 12.08.2015 12:52

Hi Peter ,

I worked a bit these days :)

I've pushed on my branch FSV2-CUSTSFIELDS what I've done so far :)

For me a way to implement "customs fields"
- is to create a level above existing "category" -defined in FS1.0 -
cf database schema

database scheme changes :
- modification fields on table flyspray_list_category (contains CATEGORY LIST)
-create new tables :
-flyspray_list_lists : contains lists saved (admin or project mode )
-flyspray_fields : contains what to display after for( tasks)

  1. lists ( affected to lists already created)
  2. date
  3. text

-flyspray_list_standard contains BASIC LIST ( simple list same as CATEGORY LIST without "tree sorts"

About graphical interface :
I add 2 new tabs in left menu , "ADD LIST" and "EDITION LIST"

not implemented today :
-menu settings's project (TAB "EDITION" is not finished )
-only use template CleanFS and don't integrate "rewrite url" module
-all process for task creation and display , miss another TABLE to save data

I think this can be done with the "Add Link" at task creation.
⇒so tell me in future what to do about "Add Link" at task creation ..


Project Manager

Hi Damien,

before discussing the topic: Could you please change how you manage your commits? What git tool do you use? If everything is changed within one commit and without a short commit description (its everytime (Signed-off-by.. ????) in your case) , using a versioning system like git is useless.

IMHO best is to fork the flyspray master, solve 1 issue and do a commit to your own branch with a short description. So only a few files are changed a little bit and so other people can see exactly how the code was changed and enable them to discuss and evaluate the code commit.

xcdam commented on 14.08.2015 10:39

Hi Peter,

First I may apologize ,
I have done a wrong action on flyspray github today ( launching pull request to you :( )

About "Custom fields" , I'm using git GUI for Windows
I all over again this morning , forked flyspay master and created branch CUSTFIELD.
But I don't understand why I still have 222 files changed ?


I've put my short description in file FILE_TO_READ

I've created

xcdam commented on 14.08.2015 13:56

this message canceled my previous message.
I've still corrected problem with my git Windows !....

you can have a look at : bye.

I need to Add some custom fields in the TASKS table. I realize that is will break things with an upgrade, but i still need them.

Can anyone indicate where to add the needed coding. Access to the database is simple, but I like to know what tpl-files needs to be upgraded etc.

Is there some documentation on this subject?

The development of a function for custom-fields is great, the workload to to this seems to be longer than my needs to fix it.

All help appreciated.

Project Manager

@Wim: 1. How much time do you have for this? I'm working on the tags feature, which is till now useless. (someone added 2013, felt progress is 10%, then they may noticed it didn't work like they thought)

I rework this for FS1.0 this month, because adding it the old way makes no sense to put it into FS1.0 release.

With tags you can at least at some words/values to a task. Maybe this is just enough for you?

2. My mental image/design for implementing custom fields differs from Damiens approach. This will be discussed and compared later on this thread.

Project Manager

@Damien: Could you please post your db scheme screenshot including its (virtual relations) to the other db tables?

My idea for custom fields in Flyspray is (currently, may change): To extend the table tasks dynamic by extra columns. These columns follow a naming scheme like 'custom_*' . To keep the users installation upgradable, the upgrader checks this on upgrades (information_schema), injecting the custom field definitions into xmlschema03 updgrade xml dynamically so the custom fields aren't not deleted, but everything else database related gets upgraded.

This way the custom fields can be in the optimized column type (date,int,text,...) for the custom field. And there is little change to existing flyspray code needed.

Project Manager

@Damien: I think best is for starting to add your work in your branch (clean fork from Flyspray/flyspray master) in small portions directly in the webbrowser editor

If every commit changes thousands lines of code it doesn't makes sense.

Your git tool for windows tool or that working directory you have local changes too much like adding temporary files like

I'm still new to git powered development (since 2015) and got all managed within the webbrowser, no extra git gui tool. Experimental coding and testing is done by loading the *.zip of the branch i want test on my testing servers, unzipping on them and (download, unzipping ("overwrite all" or new directory) done on server using ssh session) running the /setup (install or upgrader) in webbrowser.
This may not the best workflow , but for me it works quite well.

Project Manager

@Damien: You may added the flyspray_dbdev.sql for illustration purposes,

But the way flyspray wants it is the use of


So the DB scheme is cross database compatible. (at least for the supported mysql and postgresql)

The documentation of xmlschema03 is small and how much features of sql the engine of adodb/xmlschema supports in fact is topic of my researching. parameter 'platform' for instance to define the db engine for mysql. Or how foreign key key constraints definition can be mapped in the right way to the xml format.

@peter Thanks for your answer.
Tags will not do the trick. I need 2 fields in Task to hold a numeric value for admin-purposes.

Your idea to put a custom_ prefix for fields is great. I will follow this idea for now.

I am more interested in the parts where I can select fields to be selected in tasklist, etc. Is there any doc',s on this or should I just do some reverse engineering on this?

Thanks for this great job !

Project Manager

"I am more interested in the parts where I can select fields to be selected in tasklist,"


This can be configured here per project: /index.php?do=pm&area=prefs&project=1#lookandfeel
And here for the global task listing: /index.php?do=admin&area=prefs#lookandfeel

Users currently cannot set their own preferences for the task listing.

xcdam commented on 19.08.2015 15:23

Hi Peter,

I've created with "workbench" first db schema.

I have grouped "customields" under 's orange's label with foreign keys


xcdam commented on 23.09.2015 09:47

Hi Peter;
You can cancel my last comment. Today I will focus on the database for FS 2.0 .

so I work a bit these days on db scheme :) between projects.

I have some questions concerning DB :
-How do you "link" these tables :

flyspray_user_emails ( use indeed ?
to table flyspray_users.


Project Manager

flyspray_user_emails exists because a user can have several email addresses or oauth logins mapped to one user account.
At least thats probably the plan behind it. I currently don't see an user interface that lets the user connect an oauth login with an existing normal user login. :-/

I'm not familiar with the notification system of Flyspray, but in the image I added some foreign key constraints to let you see how I think the tables are "connected".

Project Manager

Changed to Feature Request.

Things to consider:

  • If a custom field is used in a project or global, the extended search form should provide a select list of existing values like the other core fields.
  • If the fields is a int,float, date or datetime field, provide a search range input (2 HTML input fields, can transformed in user interface to a javascript range slider - but with optional exact input into the fields.)
  • visible fields setting in admin and project settings must adapt to the existense of custom fields.
  • upgrades of Flyspray should handle it automatic.


  • The existing 'operating_system' field in projects is not needed in every project. Today the browser type and browser version, browser setting is often more important - at least for web projects. So this should be considered for the extended search form also.
xcdam commented on 25.04.2016 16:07

Hello Peter,

can you clarify that for me. How works new"csrftoken" in FS RC.

What must we import when we want to add new tpl files , menu like this , ...?



Project Manager

About csrftoken:

The use is quite simple: Instead of using '<form .. >' in the templates, use tpl_form() function for every form that sends data that is written to flyspray.

Here an example taken from themes/CleanFS/templates/editcomment.tpl :

<?php echo tpl_form(CreateUrl('details', $comment['task_id'], 'multipart/form-data')); ?>
<input type="hidden" name="action" value="editcomment" />

The function adds the form-tag and a hidden field with a secret token, that is checked before handling any form that modifies flyspray(db).

The token is currently stored per user session similiar to the session cookies.

What must we import when we want to add new tpl files , menu like this , ...? 

What do you want achieve?

xcdam commented on 28.04.2016 08:42

thanks,very useful for me, you answer to my questions :)

I would need a numeric field with the number of customers that have requested a specific feature, so I can sort tickets according to how popular they are. Can't use the vote feature for this, as customers don't have access to the tracker. A custom field would do the trick.

Project Manager

Hello Simon,

sure you could manually add a db field for example custom_iwantitcounter or more generic name custom_int1 of type integer to the Flyspray tasks table as quick hack, then fiddle with the get_task_list() function in includes/class.backend.php to get the column in the sql select, add the new column name to some places probably like in tpl_draw_cell() and templates. Can be probably done in 1 work day, but your install looses your modification on Flyspray version update and you have to redo the changes after any Flyspray update again. (Maybe the custom tasks db field survives a Flyspray upgrade, but that is not guaranteed yet!)

But just another idea out of the blue

How do you collect/count/manage the customers requesting a specific feature yet? Do they click somewhere on a website that increase a counter or is it coupled with their whatever-system-useraccounts? Are they 10, 100, 1000, or more?

You wrote that the customers do not have access to Flyspray, but how about adding them automatically as hidden, disabled Flyspray users with no permissions (and e.g. without email addresses so they never - even by accident/misconfiguration - ever receive a notification from Flyspray).
If you do not want personal information like the customer name within Flyspray, maybe use a scheme like 'c1', 'c2', 'c3' .. as your customers username scheme where the number is a the unique id of your primary CRM or similiar system. But that are all blurry assumptions as I do not know any of your systems. :-)

This way the customers hidden Flyspray accounts could "vote" (you (automatically) manage the entries within the votes table) for features and no database table layout change required.

Well, this approach requires more extra programming than the first solution.

Uh, and do not forget to change templates where is shown/toggle who voted for a feature and when if you want only show a number. For instance in details.view.tpl and prevent the output of the customers list who "voted" for the task.

Uh, the more I think about it:

Are disabled user votes counted in tasklist and task details page? A: currently yes, ok.

Are disabled users used for advanced search (opened_by, last_edited_by, closed_by task property)? A: yes, mmh maybe not wanted in your case.

What is shown on a disabled Flyspray users profile? A: currently: same info as for an enabled user. mhh, so maybe adjust that template too.

Do disabled users receive notifications? A: not tested yet.

Actually there's not enough volume to make any kind of automated system, I'd just like that when one of us gets an email or phone call from a customer, and they ask for some feature, we could add a comment to the ticket about what they asked for and increase the counter manually. Numbers in the 1-10 range expected.

If it plugs into to votes function that would also be great, perhaps those with a certain privilege can add 3rd party votes that does not require a user account, that should be easy right? :)

Perhaps that when you add a comment to a task you can mark that comment as an additional vote. That way there would be an explanation where the vote comes from.

Or perhaps that you can check a pro or con checkbox when entering a comment to indicate if the information in the comment makes it more or less likely that the feature is needed. This would increment and decrement a counter indicating how useful the ticket is for the product. Could go to negative numbers if lots of cons gets added.


Available keyboard shortcuts


Task Details

Task Editing