emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Contracts in Orgmode
@ 2009-12-21 19:16 Markus Heller
  2009-12-21 22:18 ` Daniel Martins
  2009-12-22 21:49 ` Markus Heller
  0 siblings, 2 replies; 6+ messages in thread
From: Markus Heller @ 2009-12-21 19:16 UTC (permalink / raw)
  To: emacs-orgmode

Hello all,

please consider the following scenario:

I have a contract with Client A; the contract is valid from January 1, 
2010 until March 31, 2010.  I want to clock all my work on tasks under 
this contract, and of course *only* while the contract is valid.  30 
days before the expiry date, I'd like to get a reminder.

After some googling and reading, I came up with the following for my org 
file Client.org:

* Contract A
   <%%(diary-block 01 01 2010 03 31 2010)>

** TODO Renew Contract
    DEADLINE: <2010-03-31 Wed>

** Task A
    :LOGBOOK:

** Task B
    :LOGBOOK:

I want to log the hours I spend on Task A and Task B, but as mentioned 
before, *only* while the contract is valid.  How can I get orgmode to 
pop up a message in the status line (or whatever it's called :)) when 
I'm trying to clock in Task A or Task B before January 1, 2010 or after 
March 31, 2010?

Any hints appreciated :)

Thanks and Cheers
Markus

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Contracts in Orgmode
  2009-12-21 19:16 Contracts in Orgmode Markus Heller
@ 2009-12-21 22:18 ` Daniel Martins
  2009-12-22 21:49 ` Markus Heller
  1 sibling, 0 replies; 6+ messages in thread
From: Daniel Martins @ 2009-12-21 22:18 UTC (permalink / raw)
  To: Markus Heller; +Cc: emacs-orgmode

Important question

It has some relation with other topic on the list

http://thread.gmane.org/gmane.emacs.orgmode/20780/focus=20857

2009/12/21 Markus Heller <hellerm2@gmail.com>:
> Hello all,
>
> please consider the following scenario:
>
> I have a contract with Client A; the contract is valid from January 1, 2010
> until March 31, 2010.  I want to clock all my work on tasks under this
> contract, and of course *only* while the contract is valid.  30 days before
> the expiry date, I'd like to get a reminder.
>
> After some googling and reading, I came up with the following for my org
> file Client.org:
>
> * Contract A
>  <%%(diary-block 01 01 2010 03 31 2010)>
>
> ** TODO Renew Contract
>   DEADLINE: <2010-03-31 Wed>
>
> ** Task A
>   :LOGBOOK:
>
> ** Task B
>   :LOGBOOK:
>
> I want to log the hours I spend on Task A and Task B, but as mentioned
> before, *only* while the contract is valid.  How can I get orgmode to pop up
> a message in the status line (or whatever it's called :)) when I'm trying to
> clock in Task A or Task B before January 1, 2010 or after March 31, 2010?
>
> Any hints appreciated :)
>
> Thanks and Cheers
> Markus
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Contracts in Orgmode
  2009-12-21 19:16 Contracts in Orgmode Markus Heller
  2009-12-21 22:18 ` Daniel Martins
@ 2009-12-22 21:49 ` Markus Heller
  2009-12-24  9:22   ` David Maus
  1 sibling, 1 reply; 6+ messages in thread
From: Markus Heller @ 2009-12-22 21:49 UTC (permalink / raw)
  To: emacs-orgmode

On 12/21/2009 11:16 AM, Markus Heller wrote:
> Hello all,
>
> please consider the following scenario:
>
> I have a contract with Client A; the contract is valid from January 1,
> 2010 until March 31, 2010. I want to clock all my work on tasks under
> this contract, and of course *only* while the contract is valid. 30 days
> before the expiry date, I'd like to get a reminder.
>

[snip]

After some more googling and having a closer look at the org manual, I 
came up with a solution that might work.  It uses dependencies and 
org-depend.el.  I've pasted it below, and as usual, I'd appreciate any 
comments/improvement :)

I realize that this is not exactly an elegant solution, but it might 
work for me.  I'd still like to see a way in orgmode to allow clocking 
in on certain tasks only during a specific period of time, maybe 
something like

** Contract for Client A
    :PROPERTIES:
      :START: 01-01-2010
      :EXPIRY: 03-31-2010
    :END:

Then, when the START date is reached, the task state gets changed to the 
TODO or STARTED, and once the expiry date is reached, it gets marked 
DONE, and cannot be clocked in anymore.  I'm not sure if this is a 
feature that would be of general interest ...  But what do the experts 
think?

Thanks and Cheers!
Markus

Here's my crude solution:


* Workorder

** TODO Create WO
    :PROPERTIES:
      :ID: WO-Create
      :TRIGGER: WO-Sign(TODO)
    :END:

** Have WO signed by PI
    :PROPERTIES:
      :ID: WO-Sign
      :BLOCKER: WO-Create
      :TRIGGER: Service(TODO) Analysis(TODO) WO-Renew(TODO)
    :END:

** Renew WO
    :PROPERTIES:
      :ID: WO-Renew
      :BLOCKER: WO-Sign
      :TRIGGER: Service(DONE) Analysis(DONE)
    :END:
    DEADLINE: <2009-12-31 Thu>

** Service NMR
    :PROPERTIES:
      :ID: Service
      :BLOCKER: WO-Sign
    :END:

** Data Analysis
    :PROPERTIES:
      :ID: Analysis
      :BLOCKER: WO-Sign
    :END:

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Re: Contracts in Orgmode
  2009-12-22 21:49 ` Markus Heller
@ 2009-12-24  9:22   ` David Maus
  2009-12-24 18:35     ` Markus Heller
  0 siblings, 1 reply; 6+ messages in thread
From: David Maus @ 2009-12-24  9:22 UTC (permalink / raw)
  To: Markus Heller; +Cc: emacs-orgmode

At Tue, 22 Dec 2009 13:49:07 -0800,
Markus Heller wrote:
> 
> 
> After some more googling and having a closer look at the org manual, I 
> came up with a solution that might work.  It uses dependencies and 
> org-depend.el.  I've pasted it below, and as usual, I'd appreciate any 
> comments/improvement :)
> 
> I realize that this is not exactly an elegant solution, but it might 
> work for me.  I'd still like to see a way in orgmode to allow clocking 
> in on certain tasks only during a specific period of time, maybe 
> something like
> 
> ** Contract for Client A
>     :PROPERTIES:
>       :START: 01-01-2010
>       :EXPIRY: 03-31-2010
>     :END:
> 
> Then, when the START date is reached, the task state gets changed to the 
> TODO or STARTED, and once the expiry date is reached, it gets marked 
> DONE, and cannot be clocked in anymore.  I'm not sure if this is a 
> feature that would be of general interest ...  But what do the experts 
> think?

With regards to closing expired items you may take a look at
org-expiry.el in the contrib directory. It provides a function to
check for and act upon entries that are past their expiration date.

What I am not quite understanding is the wish to be unable to clock in
a closed item: Isn't clocking in something you do deliberately?

Regards

 -- David
-- 
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... maus.david@gmail.com
ICQ....... 241051416

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Contracts in Orgmode
  2009-12-24  9:22   ` David Maus
@ 2009-12-24 18:35     ` Markus Heller
  2009-12-24 18:52       ` Markus Heller
  0 siblings, 1 reply; 6+ messages in thread
From: Markus Heller @ 2009-12-24 18:35 UTC (permalink / raw)
  To: emacs-orgmode

On 12/24/2009 1:22 AM, David Maus wrote:
> At Tue, 22 Dec 2009 13:49:07 -0800,
> Markus Heller wrote:
>>
>>
>> After some more googling and having a closer look at the org manual, I
>> came up with a solution that might work.  It uses dependencies and
>> org-depend.el.  I've pasted it below, and as usual, I'd appreciate any
>> comments/improvement :)
>>
>> I realize that this is not exactly an elegant solution, but it might
>> work for me.  I'd still like to see a way in orgmode to allow clocking
>> in on certain tasks only during a specific period of time, maybe
>> something like
>>
>> ** Contract for Client A
>>      :PROPERTIES:
>>        :START: 01-01-2010
>>        :EXPIRY: 03-31-2010
>>      :END:
>>
>> Then, when the START date is reached, the task state gets changed to the
>> TODO or STARTED, and once the expiry date is reached, it gets marked
>> DONE, and cannot be clocked in anymore.  I'm not sure if this is a
>> feature that would be of general interest ...  But what do the experts
>> think?
>
> With regards to closing expired items you may take a look at
> org-expiry.el in the contrib directory. It provides a function to
> check for and act upon entries that are past their expiration date.

Thanks.  I'll have a look at it.

> What I am not quite understanding is the wish to be unable to clock in
> a closed item: Isn't clocking in something you do deliberately?

Work should only be done if a valid contract exists (no valid contract, 
no payment, right? :) ).  Right now, my work flow is to bring up an 
agenda view with all STARTED items, and then I'd clock in on the 
Contract.  I'm not aware of how to check if the contract is valid or 
not, so I might be clocking in on an expired contract.

Is there a way to include an expiry flag in the agenda view?  Maybe 
there can be a regexp in the PROPERTIES that checks if the actual date 
is before the expiry date?  If that was the case, then that would let me 
see right away in the agenda view if I'm about to clock in on an expired 
contract.

I hope I'm not too confusing in my description of what I'm trying to 
achieve ...

In any case, merry xmas to all of you!
Markus

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Contracts in Orgmode
  2009-12-24 18:35     ` Markus Heller
@ 2009-12-24 18:52       ` Markus Heller
  0 siblings, 0 replies; 6+ messages in thread
From: Markus Heller @ 2009-12-24 18:52 UTC (permalink / raw)
  To: emacs-orgmode

On 12/24/2009 10:35 AM, Markus Heller wrote:
> On 12/24/2009 1:22 AM, David Maus wrote:
>> At Tue, 22 Dec 2009 13:49:07 -0800,
>> Markus Heller wrote:
>>>
>>>
>>> After some more googling and having a closer look at the org manual, I
>>> came up with a solution that might work. It uses dependencies and
>>> org-depend.el. I've pasted it below, and as usual, I'd appreciate any
>>> comments/improvement :)
>>>
>>> I realize that this is not exactly an elegant solution, but it might
>>> work for me. I'd still like to see a way in orgmode to allow clocking
>>> in on certain tasks only during a specific period of time, maybe
>>> something like
>>>
>>> ** Contract for Client A
>>> :PROPERTIES:
>>> :START: 01-01-2010
>>> :EXPIRY: 03-31-2010
>>> :END:
>>>
>>> Then, when the START date is reached, the task state gets changed to the
>>> TODO or STARTED, and once the expiry date is reached, it gets marked
>>> DONE, and cannot be clocked in anymore. I'm not sure if this is a
>>> feature that would be of general interest ... But what do the experts
>>> think?
>>
>> With regards to closing expired items you may take a look at
>> org-expiry.el in the contrib directory. It provides a function to
>> check for and act upon entries that are past their expiration date.
>
> Thanks. I'll have a look at it.
>
>> What I am not quite understanding is the wish to be unable to clock in
>> a closed item: Isn't clocking in something you do deliberately?
>
> Work should only be done if a valid contract exists (no valid contract,
> no payment, right? :) ). Right now, my work flow is to bring up an
> agenda view with all STARTED items, and then I'd clock in on the
> Contract. I'm not aware of how to check if the contract is valid or not,
> so I might be clocking in on an expired contract.
>
> Is there a way to include an expiry flag in the agenda view? Maybe there
> can be a regexp in the PROPERTIES that checks if the actual date is
> before the expiry date? If that was the case, then that would let me see
> right away in the agenda view if I'm about to clock in on an expired
> contract.

Please disregard the last paragraph here.  David already answered this 
question already.  Looks like I'm already in Christmas mode ...

Markus

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-12-24 18:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-21 19:16 Contracts in Orgmode Markus Heller
2009-12-21 22:18 ` Daniel Martins
2009-12-22 21:49 ` Markus Heller
2009-12-24  9:22   ` David Maus
2009-12-24 18:35     ` Markus Heller
2009-12-24 18:52       ` Markus Heller

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).