Forum

Create notification...
 
Notifications
Retirer tout

Create notification for Leave Period

12 Posts
2 Utilisateurs
0 Reactions
3,801 Vu
(@mcanuto)
Posts: 183
Active Member
Début du sujet
 
[#7752]

Hello,

I'd like to generate notifications on Leave periods, to alert that a leave period approaches but it is not yet accepted (for instance). 
The issue is that when I save the notification definition, I get this error:
 

I'm trying this under the version 9.2.2.

Can you tell me what am I doing wrong?

Regards,
MCanuto


 
Posté : 8 Sep PM 14:099
(@babynus)
Posts: 14952
Membre Admin
 

You're using code for fields that does not exist
idLeave is a field, so you cannot use idLeave.id.
Possibly you mean Leave.id


 
Posté : 9 Sep PM 21:099
(@mcanuto)
Posts: 183
Active Member
Début du sujet
 

Hello, Babynus,

This fields are the ones added by default, when we use the help to insert a field:
 

I tried to change them manually, afterwards, but I still get an error:

 

I even tried changing to employeeleaveperiod (as the name of the table), but it didn't work either.

Is there another way to do it?

Regards,
MCanuto


 
Posté : 10 Sep AM 11:099
(@babynus)
Posts: 14952
Membre Admin
 

I don't know what you are doing wrong, but on my side I get the correct code : ${id}
 


 
Posté : 14 Sep PM 19:099
(@mcanuto)
Posts: 183
Active Member
Début du sujet
 

Hello, Babynus,

Maybe my problem is because I don't have the element "Période d'Absence", I only have "[Période d'Absence]". It's not really the same thing, is it?

In the tilte, it seems ok, but in the content, not so much:
 

And on the email destination neither:
 

MCanuto 


 
Posté : 14 Sep PM 20:099
(@babynus)
Posts: 14952
Membre Admin
 

I think you have some issue in your talbe "notifiable".
Just check it contents (you may compare with same table on brand new install)


 
Posté : 14 Sep PM 20:099
(@mcanuto)
Posts: 183
Active Member
Début du sujet
 

I looked into my production table (v9.2.2)  and my test table (v9.2.3, upgraded today) and they are identical:

 

And I'm not sure I can see an issue. I found a way to create the notification, but I need to delete the "[]" of the notifiable element at the top, to fill all the form and retype them to save. But I don't think this is the normal way to use it.

Can you tell me what's wrong in my table, please?

Regards,
MCanuto


 
Posté : 14 Sep PM 20:099
(@babynus)
Posts: 14952
Membre Admin
 

Hi,
It seems you entered some values manually in the table (id 82 & 83)
they are different from what is inserted through migration
INSERT INTO `${prefix}notifiable` (`notifiableItem`,`name`,`idle`) VALUES
    ('Leave','Leave',0),
    ('EmployeeLeaveEarned','Leave Earned',0),
    ('Workflow','Workflow',0),
    ('Status', 'Status',0),
    ('LeaveType', 'Leave Type',0);

We don't support this kind of changes


 
Posté : 15 Sep AM 11:099
(@mcanuto)
Posts: 183
Active Member
Début du sujet
 

Hello, Babynus,

I'm pretty sur we never add records to that table manually. 
It seems like the ID 82, 83 and 86 got a name in french instead of the english one on your query.

Anyway, is there a possibility to undo it and fix the content of this table?
If we delete those records and run your query again, would it have any other impact on any other table?

At least, can you tell me in which version it was added to the database?

Thank you for any help you can provide.

Best regards,
MCanuto
 


 
Posté : 8 Oct PM 13:1010
(@babynus)
Posts: 14952
Membre Admin
 

Anyway, is there a possibility to undo it and fix the content of this table?

Yes update the table

If we delete those records and run your query again, would it have any other impact on any other table?

No, only notifications are impacted with notifiable.

At least, can you tell me in which version it was added to the database?

V8.0.0 (it was when I was young...)


 
Posté : 13 Oct PM 17:1010
(@mcanuto)
Posts: 183
Active Member
Début du sujet
 

Sorry, I took a long time to get back to you on this.

Once the table updated, it's working.

Just another question. On the notification, I cannot use the information of the Leave Type, which can be important. Is that something planned to be available on the future?

Regards,
MCanuto


 
Posté : 2 Fév PM 12:022
(@babynus)
Posts: 14952
Membre Admin
 

As designed for this feature, all fields available are proposed.
So the Leave Type may not be directly avaialble.


 
Posté : 2 Fév PM 16:022
Share:
Retour en haut