User:Jouni/Timetracker: Difference between revisions

From Opasnet
Jump to navigation Jump to search
(todo added)
mNo edit summary
Line 1: Line 1:
{{variable|moderator=Jouni|stub=Yes}}
{{variable|moderator=Jouni|stub=Yes}}
<rcode  
<rcode  
variables = "
include="page:Timetracker|name:tracker"
variables="
name:project|description:What project are you working on?|type:selection|options:'Administration';Administration;'Claih/Bioher';Claih/Bioher;'Organising work';Organising work;'Plantlibra';Plantlibra;'Urgenche';Urgenche|default:'Organising work'
name:project|description:What project are you working on?|type:selection|options:'Administration';Administration;'Claih/Bioher';Claih/Bioher;'Organising work';Organising work;'Plantlibra';Plantlibra;'Urgenche';Urgenche|default:'Organising work'
|name:start|description:When did you start the work?|type:datetime
|name:start|description:When did you start the work?|type:datetime
|name:end|description:When did you stop the work?|type:datetime
|name:end|description:When did you stop the work?|type:datetime
|name:continuous|description:|options:1;I did not stop, I am  continuing the work|type:checkbox|default:1
|name:continuous|description:|options:1;I did not stop, I am  continuing the work.|type:checkbox|default:1
|name:page|type:hidden|default:'Op_en5387'
|name:page|type:hidden|default:'Op_en5387'
"
"
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>
Line 26: Line 15:
{{attack|# |Why is the obs column not saved?|--[[User:Jouni|Jouni]] 09:48, 6 October 2011 (EEST)}}
{{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)}}
{{attack_invalid|# |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)}}
:{{attack|# |I found the error: you are not allowed to write '''name <nowiki>=</nowiki> "tracker"''' but you have to write '''name<nowiki>=</nowiki>"tracker"''' as the rcode attribute, without spaces. Easy to correct but difficult to guess. |--[[User:Jouni|Jouni]] 20:37, 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}}
{{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}}

Revision as of 17:37, 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) (type: truth; paradigms: science: attack)

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

⇤--#: . I found the error: you are not allowed to write name = "tracker" but you have to write name="tracker" as the rcode attribute, without spaces. Easy to correct but difficult to guess. --Jouni 20:37, 6 October 2011 (EEST) (type: truth; paradigms: science: attack)
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

{{#opasnet_base_link:Op_en5387}}


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 25 Nov 2024.