Loading

Adding the "never due" option in other places

Get help with problems, or report & discuss bugs in Collabtive

Adding the "never due" option in other places

Postby sdecrane » 19.01.2012, 23:10

Has anyone experimented with how to add the "never due" option to the milestone and task tabs? I was able to add it under the add milestone tab, but it isn't working correctly.
sdecrane
 
Posts: 18
Joined: 19.01.2012, 18:17

Re: Adding the "never due" option in other places

Postby some person » 21.01.2012, 00:55

I have added never due to tasks, which can be found here viewtopic.php?f=10&t=6675.

I am not sure about milestones, one of the points of milestones is the due date, but I could understand not knowing the due date.

I haven't looked, but adding "never due" to milestones shouldn't be too difficult, especially since you can copy the "never due" code that is already present for projects.

I will have a look, and if it's not too difficult I will do the modifications and post them here.
Have any Bitcoins (http://weusecoins.com) found my post helpful, you can send a tip to the following bitcoin address found on http://btc.to/a9n.
some person
 
Posts: 363
Joined: 16.04.2011, 12:46

Re: Adding the "never due" option in other places

Postby sdecrane » 24.01.2012, 18:38

Thank you very much.
sdecrane
 
Posts: 18
Joined: 19.01.2012, 18:17

Re: Adding the "never due" option in other places

Postby sdecrane » 02.02.2012, 04:52

I have added the no due date option as described above and am now returning an error. When adding new tasks if I want to use a due date, the option is now present and working, however, if I want to add a date instead of not having it "not due" it returns an error. If I select it as not due then go in and edit the task and add a due date it works, but not originally. Anyone know how to fix this problem?
sdecrane
 
Posts: 18
Joined: 19.01.2012, 18:17

Re: Adding the "never due" option in other places

Postby some person » 03.02.2012, 00:37

sdecrane wrote:I have added the no due date option as described above and am now returning an error. When adding new tasks if I want to use a due date, the option is now present and working, however, if I want to add a date instead of not having it "not due" it returns an error. If I select it as not due then go in and edit the task and add a due date it works, but not originally. Anyone know how to fix this problem?

Forgot to mention those modifications were for collabtive version 0.6.5. I will test the modifications with the newest version (0.7.5).
Have any Bitcoins (http://weusecoins.com) found my post helpful, you can send a tip to the following bitcoin address found on http://btc.to/a9n.
some person
 
Posts: 363
Joined: 16.04.2011, 12:46

Re: Adding the "never due" option in other places

Postby Tekippie » 08.02.2012, 14:44

And? does it work with 0.7.5?

I would have expected never due would be available everywhere a due date is asked.. I actually want to have never due ticked by default as I have only few projects with deadlines..
Tekippie
 
Posts: 3
Joined: 23.10.2011, 13:48

Re: Adding the "never due" option in other places

Postby some person » 09.02.2012, 00:54

Tekippie wrote:And? does it work with 0.7.5?

I would have expected never due would be available everywhere a due date is asked.. I actually want to have never due ticked by default as I have only few projects with deadlines..

Just tested and I am not seeing any errors, other then a problem when you check "Never due" option, and then unchecked it again, you are not able to enter a due date.

As I have copied the code from other parts of collabtive, this is a problem that is present in other parts of collabtive. I will take a look and see if I can fix this.

If it is needed, I can provide the modified files.
Have any Bitcoins (http://weusecoins.com) found my post helpful, you can send a tip to the following bitcoin address found on http://btc.to/a9n.
some person
 
Posts: 363
Joined: 16.04.2011, 12:46

Re: Adding the "never due" option in other places

Postby Tekippie » 09.02.2012, 20:16

Thanks. I applied the changes and it works indeed. I noticed it only effects the theme you apply it to. The fact that you can't select a due date after you ticked the box is no biggy because you only have to refresh the page to get it back.. but of course if you resolved the bug I'd like to read it ;)
Tekippie
 
Posts: 3
Joined: 23.10.2011, 13:48

Re: Adding the "never due" option in other places

Postby some person » 10.02.2012, 04:21

Here is a fix for the problem where you can't enter a due date after checking and then unchecking "Never due" option.

If you have already applied my modifications, to add never due option to tasks, which is found here viewtopic.php?f=10&t=6675, follow the below instructions to apply the fix.

In edittask.tpl, replace line 33 with the following.
Code: Select all
               <label for="neverdue"></label><input type = "checkbox" class = "checkbox" value = "neverdue" name = "neverdue" id = "neverdue" {if $task.end == 0}checked = "checked"{/if} onclick = "if (this.checked == true) {ldelim} end.value = ''; end.disabled = true; {rdelim} else {ldelim} end.disabled = false;{rdelim}"><label for = "neverdue">{#neverdue#}</label>


In addtask.tpl, replace line 10 with the following.
Code: Select all
   <label for = "neverdue"></label><input type = "checkbox" class = "checkbox" value = "neverdue" name = "neverdue" id = "neverdue" onclick = "if (this.checked == true) {ldelim} end{$lists[list].ID}.value = ''; end{$lists[list].ID}.disabled = true; {rdelim} else {ldelim} end{$lists[list].ID}.disabled = false;{rdelim}">{#neverdue#}


In addmytask.tpl, replace line 11 withe the following.
Code: Select all
   <label for = "neverdue"></label><input type = "checkbox" class = "checkbox" value = "neverdue" name = "neverdue" id = "neverdue" onclick = "if (this.checked == true) {ldelim} end{$myprojects[project].ID}.value = ''; end{$myprojects[project].ID}.disabled = true; {rdelim} else {ldelim} end{$myprojects[project].ID}.disabled = false;{rdelim}">{#neverdue#}


I will update my other post, found here viewtopic.php?f=10&t=6675, to include the above fixes.

Now the following does not pertain to my modifications, that add "never due" to tasks, but to the "never due" option that is available when adding or editing projects. This is a same fix mentioned above, but this time I have applied it to the adding and editing projects form.

In addproject.tpl, replace line 16 withe the following.
Code: Select all
      <label for = "neverdue"></label><input type = "checkbox" class = "checkbox" value = "neverdue" name = "neverdue" id = "neverdue" onclick = "if (this.checked == true) {ldelim} end.value = ''; end.disabled = true; {rdelim} else {ldelim} end.disabled = false;{rdelim}">{#neverdue#}


In editform.tpl, replace line 34 withe the following.
Code: Select all
      <label for="neverdue"></label><input type = "checkbox" class = "checkbox" value = "neverdue" name = "neverdue" id = "neverdue" {if $project.end == 0}checked = "checked"{/if} onclick = "if (this.checked == true) {ldelim} end.value = ''; end.disabled = true; {rdelim} else {ldelim} end.disabled = false;{rdelim}"><label for = "neverdue">{#neverdue#}</label>
Have any Bitcoins (http://weusecoins.com) found my post helpful, you can send a tip to the following bitcoin address found on http://btc.to/a9n.
some person
 
Posts: 363
Joined: 16.04.2011, 12:46

Re: Adding the "never due" option in other places

Postby sdecrane » 12.02.2012, 22:15

I went ahead and removed all of the code that I had added in order to have a "Never due" option for tasks because of the error I was experiencing. When I subsequently went and tried to add another project for another part of the testing I am doing, I received the same error as I was before (and hadn't been in this location before). I've attached the error that pops up. Like I mentioned before, if I create the project as never due then go in and edit it after it is created, i'm able to add a due date. Not until this point though.

Could this be a result of a mistake I made in altering code when trying to add the "no due date" to tasks?

Thanks for the solution to the unchecking "never due" problem.
Attachments
ScreenShot035.jpg
ScreenShot035.jpg (24.56 KiB) Viewed 873 times
Last edited by sdecrane on 12.02.2012, 22:17, edited 1 time in total.
sdecrane
 
Posts: 18
Joined: 19.01.2012, 18:17

Next

Return to Problems and Bugs

Who is online

Users browsing this forum: No registered users