Difference between revisions of "User:Jouni/Timetracker"

From Testiwiki
Jump to: navigation, search
(test version with include, does not work)
(todo added)
Line 10: Line 10:
 
include = "page:Timetracker|name:tracker"
 
include = "page:Timetracker|name:tracker"
 
>
 
>
 +
# This is the Timetracker#tracker code. For some reason the inclusion does not work.
 +
library(OpasnetBaseUtils)
 +
library(xtable)
 +
timetracker <- function(page) {
 +
Obs <- max(op_baseGetData("opasnet_base", page)[, "obs"])+1
 +
if(is.null(continuous)){continuous <- 0}
 +
data <- data.frame(obs = rep(Obs, 4), Parameter = c("Project", "Start", "End", "Continuous"), Result = c(project, start, end, continuous))
 +
opbase.upload(dsn = "opasnet_base_write", input = data, ident = page, acttype = 5, who = wiki_username, unit = "time")
 +
cat("Thanks for your input\n")
 +
}
 +
 
timetracker(page)
 
timetracker(page)
 
</rcode>
 
</rcode>
 +
 +
{{attack|# |Why is the obs column not saved?|--[[User:Jouni|Jouni]] 09:48, 6 October 2011 (EEST)}}
 +
 +
{{attack|# |Why is the inclusion of Timetracker#tracker not working? Anyway, the code works when copied here.|--[[User:Jouni|Jouni]] 09:48, 6 October 2011 (EEST)}}
 +
 +
{{todo|Ei kiireellinen mutta jälkimmäiseen kysymykseen löydät ehkä vastauksen viidessä minuutissa. --[[User:Jouni|Jouni]] 09:48, 6 October 2011 (EEST)|Einari Happonen}}
  
 
== Question ==
 
== Question ==

Revision as of 06:48, 6 October 2011


What project are you working on?:

When did you start the work?:
..-::

When did you stop the work?:
..-::

:
I did not stop, I am continuing the work

+ Show code

# : Why is the obs column not saved? --Jouni 09:48, 6 October 2011 (EEST)

# : Why is the inclusion of Timetracker#tracker not working? Anyway, the code works when copied here. --Jouni 09:48, 6 October 2011 (EEST)

TODO: {{#todo:Ei kiireellinen mutta jälkimmäiseen kysymykseen löydät ehkä vastauksen viidessä minuutissa. --Jouni 09:48, 6 October 2011 (EEST)|Einari Happonen|}}


Question

How does Jouni spend his time?

Answer

Show results


Rationale

The time tracker should follow the Opasnet pages that are edited during the work. The default is that those pages are linked to the ongoing project. If they are edited afterwards, that time is automatically assigned to that project. This default can be overruled by making a data table that contains a list of pages and the project they relate to.

See also

Keywords

References


Related files

<mfanonymousfilelist></mfanonymousfilelist>

Jouni/Timetracker. Opasnet . [1]. Accessed 01 Jun 2024.