Forum

Is there a way to s...
 
Notifications
Retirer tout

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

6 Posts
2 Utilisateurs
0 Reactions
3,230 Vu
 Dan
(@caccia)
Posts: 340
Honorable Member
Début du sujet
 
[#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 ?


 
Posté : 10/11/2017 6:57 pm
(@babynus)
Posts: 14952
Membre 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.


 
Posté : 10/11/2017 7:34 pm
 Dan
(@caccia)
Posts: 340
Honorable Member
Début du sujet
 

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 ?


 
Posté : 10/11/2017 7:46 pm
(@babynus)
Posts: 14952
Membre Admin
 

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


 
Posté : 10/11/2017 7:57 pm
 Dan
(@caccia)
Posts: 340
Honorable Member
Début du sujet
 

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" .


 
Posté : 10/11/2017 8:18 pm
(@babynus)
Posts: 14952
Membre 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


 
Posté : 11/11/2017 6:21 pm
Share:
Retour en haut