gtd-php
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 09, 2010, 02:44:49 AM

Login with username, password and session length
Search:     Advanced search
1756 Posts in 305 Topics by 425 Members
Latest Member: joey_ser33
* Home Help Search Calendar Login Register
+  gtd-php
|-+  gtd-php
| |-+  gtd-php users
| | |-+  When creating an inbox item isSomeday is turned to Y automatically
« previous next »
Pages: [1] Print
Author Topic: When creating an inbox item isSomeday is turned to Y automatically  (Read 363 times)
raamklaza
Full Member
***
Posts: 20


View Profile
« on: July 12, 2010, 03:28:16 AM »

When creating an inbox item isSomeday is turned tpY automatically.

Which means you won't see these items unless i check the Someday checkbox while processing the inbox.

How can i make sure the isSomeday isn't automatically set when i make a new inbox-item?
« Last Edit: July 12, 2010, 03:34:27 AM by raamklaza » Logged
Andrew
Administrator
Hero Member
*****
Posts: 375


View Profile
« Reply #1 on: July 12, 2010, 03:39:47 AM »

add an extra hidden variable to the form you've set up to create inbox items:
name=isSomeday  value=n

But it should be defaulting to 'n' anyway. Can you switch on debugging, and find out where it's getting set to 'y'?
Configure > Preferences > Debugging
and check both boxes:
  • Show detailed debugging information
  • Wait after updating an item, rather than progressing to the next screen automatically
Logged
raamklaza
Full Member
***
Posts: 20


View Profile
« Reply #2 on: July 12, 2010, 04:00:13 AM »

I can find a lot [isSomeday] => n, too many for my understaning.

What i do see is  this when looking for [isSomeday] => y:
Code:
↑ ↓ Sqlparts 'issomeday': Result  its.`isSomeday`='y'
↑ ↓ Sanitised values in sqlparts Array
(
    [itemId] => 0
    [parentId] => Array
        (
        )

    [filterquery] =>  WHERE  its.`type` = 'p'  AND  (CURDATE()>=its.`tickledate` OR its.`tickledate` IS NULL)  AND  its.`dateCompleted` IS NULL  AND  its.`isSomeday`='n'
    [tagname] =>
    [desiredOutcome] =>
    [description] =>
    [title] =>
    [tickledate] =>
    [recurdesc] =>
    [dateCompleted] =>
    [deadline] =>
    [type] => p
    [isSomeday] => y
    [categoryId] => 0
    [contextId] => 0
    [timeframeId] => 0
    [timefilterquery] =>
    [recur] =>
    [childfilterquery] =>  WHERE  its.`type` = 'a'  AND  its.`isSomeday`='n'  AND  (CURDATE()>=its.`tickledate` OR its.`tickledate` IS NULL)  AND  its.`dateCompleted` IS NULL
)
↑ ↓ Query Label: getitems
↑ ↓ Values to be made safe: Array
(
    [itemId] => 0
    [parentId] => Array
        (
        )

    [filterquery] =>  WHERE  its.`type` = 'p'  AND  (CURDATE()>=its.`tickledate` OR its.`tickledate` IS NULL)  AND  its.`dateCompleted` IS NULL  AND  its.`isSomeday`='y'
    [tagname] =>
    [desiredOutcome] =>
    [description] =>
    [title] =>
    [tickledate] =>
    [recurdesc] =>
    [dateCompleted] =>
    [deadline] =>
    [type] => p
    [isSomeday] => y
    [categoryId] => 0
    [contextId] => 0
    [timeframeId] => 0
    [timefilterquery] =>
    [recur] =>
    [childfilterquery] =>  WHERE  its.`type` = 'a'  AND  its.`isSomeday`='n'  AND  (CURDATE()>=its.`tickledate` OR its.`tickledate` IS NULL)  AND  its.`dateCompleted` IS NULL
)
Logged
raamklaza
Full Member
***
Posts: 20


View Profile
« Reply #3 on: July 12, 2010, 04:04:34 AM »

BTW, this is standard functionality.

I just unzipped 0.9 rc1..

I didn't do any modifications
Logged
raamklaza
Full Member
***
Posts: 20


View Profile
« Reply #4 on: July 12, 2010, 05:48:25 AM »

Addition:

When i create a new inbox item the post array looks like this:

So somehow isSomeday is set to Y
Code:
↓ $_REQUEST Array
(
    [title] => test
    [categoryId] => 0
    [contextId] => 0
    [timeframeId] => 0
    [deadline] =>
    [dateCompleted] =>
    [description] => test
    [desiredOutcome] =>
    [tags] =>
    [itemNext] => View item
    [required] => title:notnull:Title must not be blank.,tickledate:date:Suppress date must be a valid date.,deadline:date:Deadline must be a valid date.,dateCompleted:date:Completion date must be a valid date.,UNTIL:date:Dont-repeat-after date must be a valid date.
    [dateformat] => ccyy-mm-dd
    [referrer] =>
    [type] => i
    [itemId] => 0
    [firstDayOfWeek] => 1
    [action] => create
    [tickledate] =>
    [nextaction] =>
    [isSomeday] => y
    [recurdesc] =>
    [recur] =>
    [afterCreate] =>
    [lastcreate] => type=i
)
Logged
raamklaza
Full Member
***
Posts: 20


View Profile
« Reply #5 on: July 12, 2010, 12:14:11 PM »

add an extra hidden variable to the form you've set up to create inbox items:
name=isSomeday  value=n

Where in item.php should i add that line for an inbox item?
Logged
raamklaza
Full Member
***
Posts: 20


View Profile
« Reply #6 on: July 12, 2010, 12:53:29 PM »

I found a work-around.

First in the settings i checked:
"When editing an item, display choice of next page as a radio group rather than as submit buttons"

Then when i clicked capture Inbox item all the time Someday was checked. Even when i unchecked it on an item, it stayed checked some how.

So i went into the code of item.php and i changed line from this:
               
Code:
<input type='checkbox' name='isSomeday' id='isSomeday' value='n' title='Places item in Someday file'<?php if ($values['isSomeday']==='y') echo " checked='checked'";?> />

To this:
             
Code:
<input type='checkbox' name='isSomeday' id='isSomeday' value='n' title='Places item in Someday file' />

Now the Someday checkbox is NEVER checked unless i specify it Smiley
Logged
Andrew
Administrator
Hero Member
*****
Posts: 375


View Profile
« Reply #7 on: July 15, 2010, 03:24:35 PM »

Now the Someday checkbox is NEVER checked unless i specify it Smiley

Be careful: with this change, when you edit a someday item, the someday flag will get reset each time.

I can't work out why it's defaulting to 'y'. Very strange. I'll try to reproduce it here.
Logged
raamklaza
Full Member
***
Posts: 20


View Profile
« Reply #8 on: July 19, 2010, 05:06:23 AM »

This solution is oke for me, as i only make inbox items which i process later as a whole.

But yes it doens't remember the settings anymore.
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!