Due date hh:mm hard to set

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
istvanb
Posts: 226
Joined: 22 Aug 2010, 21:00

Due date hh:mm hard to set

Post by istvanb »

Our users use the due date field of the issues, but they normally dont set the hh:mm which is really not intuitive to use. Therefore if the due date is the "today" then the issue is due right when the submit the issue. Is there a way to set the hh:mm to a default value like (17:00), or is there any other way to get rid of this issue?
cas
Posts: 1622
Joined: 11 Mar 2006, 16:08
Contact:

Re: Due date hh:mm hard to set

Post by cas »

Simply use this plugin to set the duedate fully automatic:
http://www.mantisbt.org/bugs/view.php?id=12522
istvanb
Posts: 226
Joined: 22 Aug 2010, 21:00

Re: Due date hh:mm hard to set

Post by istvanb »

Hey Cas,

thanks for the reply. Its not a 100% solution to my problem though since some cases it makes sense for the user to select the actual day as a due date. The problem appears at this point since they are too lazy to set the hh:mm properly so the issue is due right when the submit it.

I am wondering though if this can resolve the problem:

Code: Select all

	function setDate($p_event,$p_bug_data) {
		if ($p_bug_data->due_date < time() + 24 * 60 * 60){
			$p_bug_data->due_date = time()+ 24 *  60 *  60);
		}
		return $p
This is not a hundred percent solution but it sets the due date 1 day after the issue is submitted which makes sense. (and not sure if the php code works, I just modified the you wrote in the plugin)

Maybe the one day could be a variable as well instead of having it hardcoded. To move forward, i think it could be somewhat easy to set the due date based on the priority of the issue (immediate: 1 day, urgent: 2 days, high: 3 days, low: 7 days etc). Not sure if you agree with this though, so I am really looking forward to get your opinion.

thanks,
istvan
cas
Posts: 1622
Joined: 11 Mar 2006, 16:08
Contact:

Re: Due date hh:mm hard to set

Post by cas »

The plugin only sets a date if none is set, so if they choose a date, no change is made.
Your code will work, you could adjust the plugin code to achieve exactly that.
I do like the idea of incorporating priorities into it. Can also add 1 day (or variable number of days) if the issue is set to be expired on that very moment.
Allow me some time and I will add it in the next version.
Post Reply