Hi,
User story:
As an Admin I would like to prevent users from adding additional job_items to the given job after the job is closed.
View:
On the detail view of a job (lets call it “Job details”) , the inline view of the related job_items is displayed.
As we know this inline view enables the user for direct job_item creation to the given job.
Problem:
As I understand, the action to ”Add” a record to any table cannot be controlled by row-level “Only if this condition is true” expression (ex.: IF job is closed…) because it is a table-level action.
However,
Context() rules can be applied whether the action should be hidden or not.
or
I can create a custom “Add job_item” action that can handle row-level conditions for the job’s status. (But this action won’t be displayed at the inline view I guess)
I was thinking, what could be the most efficient way of handling this situations and my idea is:
- in case we could pass and retrieve metadata to the given context based on the displayed row’s information,
- we wouldn’t have to create new view to restrict the original “Add” action.
Questions:
- Is my description accurate about the problem? Does anyone knows a solution that doesn’t require new view or action creation?
- IF I was right,
- what is your opinion about the context metadata idea?
- Does this situation happens often enough to make such a feature worth to develop in your opinion? (Or are there other usecases where such a feature would make our life easier?)