you made a column, “closed_id” and are trying to call it using “closed_name” or “closed_username”? Surely you see the problem there, right?
That said, there is going to be more to it than that. All task data is generally supplied by the taskfinder, and so your column may not provide the data through the existing finder(as it may not be included in the current finder, depending on the function it uses). So you may have to account for that, get the “closed_id” and then perform another lookup through the usermodel to get the username or name. Where do you define those? Anywhere before it gets called, and in a manner that sends the data to said template, or even in said template. Generally speaking, the controller that calls on whatever template that is, sends an array of data to the template as well.
Notice below, task is sent to the template task/show
via 'task' => $task
and $task
is defined as $task = $this->getTask
.
Now trace it back further, and find out what is getTask
? Well…
As you can see here, its calling the TaskFinderModel. Now go look at that model, getDetails Function, and in this instance, you are actually in luck, as it grabs all the columns, might not always be the case though if it uses getExtendedQuery for instance, so in this case you just need to used “closed_id” and lookup the username/name in the usermodel and then define it in the $task
array…so…there ya go.
But I guess the question is, how would YOU include it? Well, there are actually a lot of answers here, some easy, some not so easy, some take a lot of work, some take no work. There isn’t just 1 answer, but I think you have enough information to answer it yourself now.
I’ll provide a hint though. $task['closed_name'] = ?????
Now I’m going to tell you a story:
I’ve spent alot of time writing plugins, and giving full detailed answers, im talking years and 1000’s of hours of work. I checked my paypal account the other day, and someone was generous enough to donate $750 bucks for Group_assign and all the work I put in to it. I was so excited, for such a generous donation. First time.
Literally that very same day, our toilet upstairs, sprung a leak, and so I had to call a plumber, I shit you not. This dude came over, lifted the toilet up, moved it 2 feet, and said the flange rusted out. Then he cut a hole in the ceiling downstairs to look at any damage. That’s all he did, and it took him 1 hour and a half to do it. Guess what he charged me. You guessed it, $750.
I’ll let you figure out the rest.