I created 2 custom fields and would like to calculated these custom fields
from other field eg. ACTUAL DURATION is ACTUAL FINISH - ACTUAL START.
Is there any way to do like this?
I don't believe such a capability exists, short of writing an external script that sets the computed values via the API. Your idea for a "calculated custom field" is interesting. I have worked with systems that have this type of thing -- Intuit QuickBase, for example -- and it can certainly be useful.
In database-driven web apps, the more common way to achieve this is not to refer to it as a "calculated field" (which would feel like part of the schema for the entity), but as part of a report that can be generated for these entities.
In OpenProject, these reports are the Work Package Table Views (with URLs like "/projects/<project_name>/work-packages"). These views are configurable, and can be saved and shared, so one way to address the feature you are describing would be to make an addition to the view configuration modal:
The new configuration could be under "Columns", or under a new tab.
Of course, this leads to questions about whether the calculated columns can be used for filtering and sorting. There's definitely some specification needed for a feature like this.
Thank you for your reply Zack Glennie. How about Regular Expression in the custom field setup. Is there anyway to use this field to setup for calculated this custom field.
Do you mean for validation? If so, that sounds like a separate topic.
Edit - re-reading your question, it sounds like maybe you are asking if regular expressions could be employed as a mechanism for effectively creating a Calculated Custom Field. I haven't seen anything about regular expressions anywhere in OpenProject, actually, so I think the answer would be no.
Replies (3)
I don't believe such a capability exists, short of writing an external script that sets the computed values via the API. Your idea for a "calculated custom field" is interesting. I have worked with systems that have this type of thing -- Intuit QuickBase, for example -- and it can certainly be useful.
In database-driven web apps, the more common way to achieve this is not to refer to it as a "calculated field" (which would feel like part of the schema for the entity), but as part of a report that can be generated for these entities.
In OpenProject, these reports are the Work Package Table Views (with URLs like "/projects/<project_name>/work-packages"). These views are configurable, and can be saved and shared, so one way to address the feature you are describing would be to make an addition to the view configuration modal:
The new configuration could be under "Columns", or under a new tab.
Of course, this leads to questions about whether the calculated columns can be used for filtering and sorting. There's definitely some specification needed for a feature like this.
edit: I just noticed that there is another topic about this: https://community.openproject.com/topics/9575
Thank you for your reply Zack Glennie. How about Regular Expression in the custom field setup. Is there anyway to use this field to setup for calculated this custom field.
Do you mean for validation? If so, that sounds like a separate topic.
Edit - re-reading your question, it sounds like maybe you are asking if regular expressions could be employed as a mechanism for effectively creating a Calculated Custom Field. I haven't seen anything about regular expressions anywhere in OpenProject, actually, so I think the answer would be no.