Hi folks,
Im adding a new custom field that doesn´t need to have its value stored.
I´ll calculate this value through a simple query and display it only at view_all_bug_page.
So I just only want to know the better way to make theese query populate my custom field...
will I have to make a hard code at filter_get_bug_rows method to add this query ? .. for example
thanks
How to add custom fields with dinamic values (not stored)
Moderators: Developer, Contributor
Re: How to add custom fields with dinamic values (not stored
I have this exact need, as well - I really hope someone will answer this question ...
I've thought of two approaches:
The first would be to not create the custom field at all, and just use the bug event EVENT_VIEW_BUG_DETAILS to add content to the bug's view for the calculated value (and whatever label you want to give it). I don't like this approach because it involves not having an actual field for the calculated value, and thus missing out on all the other capabilities around fields (searching, etc...).
The second involves making an actual change to the MantisBT product itself, and can be described as adding support for a "calculated value" custom field type. I think the best way to do this would be to implement a custom function hook like the one for dynamically filling an enumeration's possible value list, only this new function would be invoked any time the value for the "field" is referenced. The field wouldn't represent anything stored in the database, except for the metadata about the field (like in the mantis_custom_fields_table, etc...). I'm not sure how big of a change this would be, but I may end up taking it on if there's no other solution for this need.
Thoughts ?
Sincere thanks for any feedback ...
I've thought of two approaches:
The first would be to not create the custom field at all, and just use the bug event EVENT_VIEW_BUG_DETAILS to add content to the bug's view for the calculated value (and whatever label you want to give it). I don't like this approach because it involves not having an actual field for the calculated value, and thus missing out on all the other capabilities around fields (searching, etc...).
The second involves making an actual change to the MantisBT product itself, and can be described as adding support for a "calculated value" custom field type. I think the best way to do this would be to implement a custom function hook like the one for dynamically filling an enumeration's possible value list, only this new function would be invoked any time the value for the "field" is referenced. The field wouldn't represent anything stored in the database, except for the metadata about the field (like in the mantis_custom_fields_table, etc...). I'm not sure how big of a change this would be, but I may end up taking it on if there's no other solution for this need.
Thoughts ?
Sincere thanks for any feedback ...