[TYPO3-team-core-v5] Work Package Listing -- Feedback needed
Aske Ertmann
aske at moc.net
Mon Mar 18 13:17:23 CET 2013
> BTW: Instead of adding a "calculation ViewHelper" I'd calculate the days in the controller in order to keep the template simpler (it's just a minor minor thingy of course, but since all the code is public we should be a good example) – i can push a follow up if you want.
I added that because then I didn't have to modify the response in the controller, but we can do that instead of course if you prefer that. Feel free to do so :)
> I don't get the difference to for http://forge.typo3.org/projects/typo3neos-distribution-base/issues?query_id=435 – at least, that's what should be the default for this one too (instead of adding a new query).
The difference is that I'm able to modify the query and the original was grouped, which made it impossible to achieve what I needed.
> Definitely! Maybe encapsulate
>
> $workPackagesAsString = file_get_contents('http://forge.typo3.org/projects/typo3neos-distribution-base/issues.json?query_id=443');
> $workPackages = json_decode($workPackagesAsString);
> $this->view->assign('workPackages', $workPackages->issues);
>
> to
>
> $this->view->assign('workPackages', $workPackageService->getAll());
>
> (or similar)
> and add cache and work day calculation there.
To be honest I'd prefer using Varnish instead of using the cache framework for this purpose. When developing I want the newest from forge on every request, but on production I want Varnish to cache the page. Getting Varnish working would also help the response times greatly on the site in general.
If you'd like to have a work package service to fetch the issues and calculate the work days, go ahead, but it's a little overkill IMO.
I would suggest to just loop over the work packages array and add work days if estimated time is available.
Aske
On 18/03/2013, at 12.17, Bastian Waidelich wrote:
> Aske Ertmann wrote:
>
> Hi again,
>
>> I also wanted to change the label for estimated time to "Amount: 20 work days", like it was in the first draft.
>
> BTW: Instead of adding a "calculation ViewHelper" I'd calculate the days in the controller in order to keep the template simpler (it's just a minor minor thingy of course, but since all the code is public we should be a good example) – i can push a follow up if you want.
>
>
>> Another thing is that I created a new Query in forge with these settings http://i.imgur.com/wBIozKt.png, to get a json result I could use for what I needed..
>> Do you agree with the sorting? Basically it means that all the new packages is at the bottom and then the packages with a due date longest in the future is on top.
>> It can easily be changed of course, but the options are somewhat limited though.
>
> I don't get the difference to for http://forge.typo3.org/projects/typo3neos-distribution-base/issues?query_id=435 – at least, that's what should be the default for this one too (instead of adding a new query).
> IIRC we tried to achieve that on T3BOARD but the target versions are internally sorted by release date (which we didn't want to set *g).
>
>
>> [...] since the script sends a request to forge, which is sometimes a little slow, we should definitely cache this page for like an hour or so.
>
> Definitely! Maybe encapsulate
>
> $workPackagesAsString = file_get_contents('http://forge.typo3.org/projects/typo3neos-distribution-base/issues.json?query_id=443');
> $workPackages = json_decode($workPackagesAsString);
> $this->view->assign('workPackages', $workPackages->issues);
>
> to
>
> $this->view->assign('workPackages', $workPackageService->getAll());
>
> (or similar)
> and add cache and work day calculation there.
>
> Let me know if I should take over the PHP part
>
> --
> Bastian Waidelich
> --
> Core Developer Team
>
> TYPO3 .... inspiring people to share!
> Get involved: typo3.org
> _______________________________________________
> TYPO3-team-core-v5 mailing list
> TYPO3-team-core-v5 at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-team-core-v5
More information about the TYPO3-team-core-v5
mailing list