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.

Invalid controls
 
Notifications
Clear all

Invalid controls

5 Posts
3 Users
0 Reactions
3,643 Views
Evgueni Kolossov
(@ekolossov)
Posts: 566
Contributor
Topic starter
 
[#1313]

In many areas now (from version 3.4, I believe)is not possible to change the type (project, ticket, etc.) even by administrator. Invalid control message (see attachment) popping up.


 
Posted : 07 Aug 2013 12H33
 Dan
(@caccia)
Posts: 340
Contributor
 

Impressive timing, same as my previous question! 😉

Thanks for pointing out indeed, this seems to be coming from new code of the V3.4.

I notice, concerning the 2 points I mentioned in my earlier post, that by commenting the new "control workflow" code in SqlElement (this part below) I am able to perform the changes to project type and activity status.

Spoiler
    // control Workflow 
    $class=get_class($this);
    $old=new $class($this->id);
    $fldType='id'.$class.'Type';
    debugLog("DHI",basename(__FILE__),__FUNCTION__,__LINE__);
    if ( property_exists($class, 'idStatus') and property_exists($class, $fldType) and $old->idStatus
      and (trim($old->idStatus)!=trim($this->idStatus) or trim($old->$fldType)!=trim($this->$fldType) ) 
      and $old->id and $class!='Document' and trim($old->idStatus) and trim($old->$fldType)) {
    	$type=new Type($this->$fldType);
    	$crit=array('idWorkflow'=>$type->idWorkflow,
    	            'idStatusFrom'=>$old->idStatus,
    	            'idStatusTo'=>$this->idStatus,
    	            'idProfile'=>$_SESSION['user']->idProfile);
    	$ws=SqlElement::getSingleSqlElementFromCriteria('WorkflowStatus', $crit);
    	if (!$ws or !$ws->id or $ws->allowed!=1) {
    		$oldStat=new Status($old->idStatus);
    		if (! $oldStat->isCopyStatus) {
    	    $result.="
" . i18n("errorWorflow"); } } }

[/spoiler]
Of course, I guess this was added for a reason, so commenting out may not be the best way to go... It seems to work as a temporary measure however.


 
Posted : 07 Aug 2013 13H55
(@babynus)
Posts: 14952
Member Admin
 

Hi,

Ticket #1159 is recorded : changing type may be unexpectedly refused.
Fix will soon be proposed/

Please notice that you can change type if you change status in the save time (may be a workaround)

The controls you noticed have been added on V3.4 to reinforce workflow control.
Before V3.4, workflow was forced only by proposing limited list of status, corresponding to workflow.
Now, the workflow is also controlled on server side.
This will avoid unexpected change from non trivial media :
- from import
- from multiple change screen (new feature in V3.4)
Control on the status seems correct, but control on type seems incorrect.


 
Posted : 07 Aug 2013 23H47
(@babynus)
Posts: 14952
Member Admin
 

This issue is now fixed on V3.4.3 😉

Please notice that the control still exists and may be blocking, but only when expected.
For instance, imagine you have TypeA where workflow (for current user) is A=>B=>C, and TypeB where workflow is A=>C
If you have element of TypeA in status B, you cannot move it to TypeB without changing status.


 
Posted : 09 Aug 2013 14H00
Evgueni Kolossov
(@ekolossov)
Posts: 566
Contributor
Topic starter
 

Thank you very much!
Hopefully no serious bugs implemented together with fix 🙂
Regards,
Evgueni


 
Posted : 09 Aug 2013 14H03
Share:

Scroll to Top