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.

Is there a way to s...
 
Notifications
Clear all

Is there a way to set a field 'NULL' in multiple update ?

6 Posts
2 Users
0 Reactions
3,239 Views
 Dan
(@caccia)
Posts: 340
Contributor
Topic starter
 
[#4773]

Hello,
Using multiple update, I wanted to move some tickets to a different project.
I had defined a planning activity for these tickets, but want to simply move them to new project without giving them a planning activity.

Is it possible to set planning activity = 'null' in multiple update ?


 
Posted : 10 Nov 2017 18H57
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

No.
No value for field means no change.

But you can do this with import :
- export your activities to csv format,
- update you csv file to set Planning Activity to NULL
- import.


 
Posted : 10 Nov 2017 19H34
 Dan
(@caccia)
Posts: 340
Contributor
Topic starter
 

I actually tried using import of CSV file, but it tells me "nothing to update" if I just set the planning activity to NULL.
See attached in my initial message - does it need quotes or something ?


 
Posted : 10 Nov 2017 19H46
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

replace header "planning activity" with field id "idActivity"
Otherwise, we look for activity named "NULL"


 
Posted : 10 Nov 2017 19H57
 Dan
(@caccia)
Posts: 340
Contributor
Topic starter
 

Sorry - I was too confident. Actually even with 'idActivity' as header I end up with "no change to update".
Perhaps you could confirm with the attached file on the Demo site ? (i don't have access to the Import screen there :))
Project is "Import-tst" .


 
Posted : 10 Nov 2017 20H18
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

Yep, that's right.
NULL value does not work for lists field.

To have it work, you must change line 431 in /model/Importable.php, from

						if (substr($fldName, 0, 2) == 'id' and substr($fldName, 0, 4) != 'idle' and strlen($fldName) > 2 and !is_numeric($field) ) {

to

						if (substr($fldName, 0, 2) == 'id' and substr($fldName, 0, 4) != 'idle' and strlen($fldName) > 2 and !is_numeric($field) and $field!=null) {

This patch will be included in V6.5.0


 
Posted : 11 Nov 2017 18H21
Share:

Scroll to Top