Loading

Start and End task date one and the same

General Discussion around Collabtive

Start and End task date one and the same

Postby onda » 15.02.2016, 14:11

When creating and editing a task, the date of the task has only one date field, any ideas?
onda
 
Posts: 95
Joined: 26.11.2012, 16:16

Re: Start and End task date one and the same

Postby BaneD » 15.03.2016, 02:41

Hi :)

I actually always saw both Start (start task on) and Due (end task on) date fields when adding a task to a tasklist. I am however using 2.1.1. maybe you should check out the latest version if currently not on it.

Cheers,
Bane
BaneD
 
Posts: 16
Joined: 13.01.2016, 20:26

Re: Start and End task date one and the same

Postby onda » 15.03.2016, 12:26

Yes true, however you have to set both fields when adding and editing a task,in this particular case I just need one date field
onda
 
Posts: 95
Joined: 26.11.2012, 16:16

Re: Start and End task date one and the same

Postby BaneD » 15.03.2016, 16:24

Hi,

OK, I get what you mean now.

There are different ways to deal with it, I guess the path of least resistance would be to change the template.

For example if you open /templates/standard/addtask.tpl

On line 45 you can see the field for due date and on line 21 the start date.

I am not sure which one you would like to "kick out", but you could simply add a small js script after one of them that changes the other, or add a pre-defined start date - if you for example want to have all of them registered as started on 1st of Jan this year, or add a current date to be pre-filled, etc.

It is also simple to just replace the required="1" to required="0" so that it no longer demands this date (however I do presume that that might not play well with the system), so pre-defined date seems best in my eyes.

To summarize, I believe that the best option would be to add some predefined date over other examples since that would allow you to use both fields at some point if needed - without being required to remove the 'patch', in which case, I would set it up for current day or two days in future, etc (depending on your own requirements).

Hope that helps :)

Cheers,
Bane
BaneD
 
Posts: 16
Joined: 13.01.2016, 20:26

Re: Start and End task date one and the same

Postby onda » 16.03.2016, 12:38

If it were so simple,I agree what is needed is some js script to return both fields with the same date, especially when it comes to editing, originally the task was timestamped to the actual date and the due date set, which was unworkable for many, so a work around to enable to set the start date was created. working on it
onda
 
Posts: 95
Joined: 26.11.2012, 16:16

Re: Start and End task date one and the same

Postby BaneD » 18.03.2016, 10:48

Hi,

I guess something like this would work:

Code: Select all
<div class="row">
        <label for="ifSame">Is same as start?:</label>
        <input type="checkbox" required="0" id="ifSame" realname="IfSame" name="ifSame" class="checkbox" onclick="document.getElementById('end_{$lists[list].ID}').value = document.getElementById('start_{$lists[list].ID}').value;">
</div>


It would need to go into addtask.tpl mentioned earlier. I would place it either on a line 39 (before due date field) or 58 (after it)

All that it would do is to copy the start date as the end date when clicked. It will not save its value into the DB, so in my eyes, this would be a simple approach that does not require a lot of changes to be done, so it is likely to work with the future versions as well.

Have not tested it though since it is live I did not want to add it and possibly create confusion, but looking at how they wrote everything it should work.

Cheers,
Bane
BaneD
 
Posts: 16
Joined: 13.01.2016, 20:26


Return to General

Who is online

Users browsing this forum: No registered users

cron