Subclassing issues
Added by Diego Jesus over 12 years ago
Hello,
In my plugin project, I'm currently trying to create subclasses of issue (task, backlog item, etc..). Everything is working fine until I try to edit/update instances of those subclasses.
First, if I use the context menu to update some parameter, nothing happens. Well, the page gets reloaded, there is a call to IssuesController#bulk_update, but the issue isn't updated.
Here's the parameters passed to bulk_update when I try to change the done ratio to 60:
Parameters: {"back_url"=>"/projects/projectone/issues", "authenticity_token"=>"M+R11iLnPU1zEb88dCOF6GWkmg0nKeevmCNx1cme9rI=", "ids"=>["2"], "issue"=>{"done_ratio"=>"60"}}
Digging in the bulk_update code, I found that safe_attributes (correctly) being called but it produces no output log, as a normal call would (mainly SQL logs).
The update call to SQL is, also, not updating the done ratio:
(0.4ms) UPDATE `issues` SET `lock_version` = 10, `updated_on` = '2012-07-25 09:16:22' WHERE `issues`.`type` IN ('AimsProductBacklogItem') AND (`issues`.`id` = 2 AND `issues`.`lock_version` = 9)
The second problem is about the edit form for any of the subclassed issues. Most of the parameters simply don't appear, and the ones that do, have the same problem as mentioned above.
I was wondering if someone has had this problem and how it could be fixed. I could use the hook in bulk_update, but I believe that it would be error prone..
Thanks in advance