Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

ticket status multi...
 
Notifications
Clear all

ticket status multiple updates (batch mode)

5 Posts
3 Users
0 Reactions
5,311 Views
pennec
(@bpennec)
Posts: 4
Active Member
Topic starter
 
[#2053]

Hi,

I have a issue when I want to update tickets status to "done" or "closed" in batch mode.
In that case, the closed date or the done date in not set (it is a required fields in interactive mode).

Could you add the current date or a field like it is for due date in the multiple update screen ?

King regards,
Bruno


 
Posted : 22 Oct 2014 17H19
(@babynus)
Posts: 14952
Member Admin
 

Ticket #1564 recorded.
I'll have a look.


 
Posted : 22 Oct 2014 17H51
 BEAU
(@mamath)
Posts: 24
Active Member
 

Hi,

I have the same problem, and i solve it by changing the "recalculateCheckboxes" function in SqlElement.php

public function recalculateCheckboxes($force=false) {
	// if no status => nothing to do
	if (! property_exists($this, 'idStatus')) {
		return;
	}
	$status=new Status($this->idStatus);
	// if no type => nothong to do
	$fldType = 'id' . get_class($this) . 'Type';
	$typeClass=get_class($this) . 'Type';
	if (! property_exists($this, $fldType)) {
		return;
	}
	$type=new $typeClass($this->$fldType);
	if ( ( (property_exists($type,'lockHandled') and $type->lockHandled) or $force)
	and property_exists($this,'handled')) {
		if ($status->setHandledStatus) {
			$this->handled=1;
			if (property_exists($this,'handledDate') and !$this->handledDate) $this->handledDate=date("Y-m-d");
			if (property_exists($this,'handledDateTime') and !$this->handledDateTime) $this->handledDateTime=date("Y-m-d H:i:s");
		} else {
			$this->handled=0;
		}
	}
	if ( ( (property_exists($type,'lockDone') and $type->lockDone) or $force)
	and property_exists($this,'done') ) {
		if ($status->setDoneStatus) {
			$this->done=1;
			if (property_exists($this,'doneDate') and !$this->doneDate) $this->doneDate=date("Y-m-d");
			if (property_exists($this,'doneDateTime') and !$this->doneDateTime) $this->doneDateTime=date("Y-m-d H:i:s");
		} else {
			$this->done=0;
		}
	}
	if ( ( (property_exists($type,'lockIdle') and $type->lockIdle) or $force)
	and property_exists($this,'idle') ) {
		if (! self::isSaveConfirmed()) {
		// If save confirmed, must not override idle status that is cascaded
			if ($status->setIdleStatus) {
				$this->idle=1;
				if (property_exists($this,'idleDate') and !$this->idleDate) $this->idleDate=date("Y-m-d");
				if (property_exists($this,'idleDateTime') and !$this->idleDateTime) $this->idleDateTime=date("Y-m-d H:i:s");
			} else {
				$this->idle=0;
			}
		}
	}
	if ( ( (property_exists($type,'lockCancelled') and $type->lockCancelled) or $force)
		and property_exists($this,'cancelled') ) {
			$this->cancelled=($status->setCancelledStatus)?1:0;
	}
}

Bye


 
Posted : 23 Oct 2014 3H22
pennec
(@bpennec)
Posts: 4
Active Member
Topic starter
 

Hi mamath,

I have applied your patch, and I work now.
Thank you very much for this workaround.

Bye


 
Posted : 23 Oct 2014 11H58
(@babynus)
Posts: 14952
Member Admin
 

Hi Mamath,

Thanks for this fix.
Will be included in next version !


 
Posted : 23 Oct 2014 15H26
Share:

Scroll to Top