An issue on creating leave application workflow

Guys I am trying to create a workflow for leave application, The Approval state works fine when the department director approves and then the HR manager also can reject or approve, but the department director can’t reject it, it is showing the following error

Error: Value missing for Leave Application: Status

This is a transition rule

This is the sates

Is there something I am missing?

I changed the next state from Draft to Rejected and it worked, I don’t know why the Draft state was causing the issue.

yes because default should be pending not draft first state

Does the name of the state really matter? I mean using ‘Draft’ or ‘Pending’

yes it does

do you have a status field in your document?? if yes check all the listed options

status field in your document?

I didn’t get that. I am creating the workflow for the leave application doctype, and I have already created workflow states:

yes here its pending and in workflow its draft so thats why its sayiing value missings

Ow ok, I think the three states

  • Approved
  • Rejected
  • Pending
    are default workflow states, and I added draft to use it.

yes :+1:

1 Like

you can mark it as a solution :slightly_smiling_face:

1 Like

Hello @Mubasher
I just added another row to the preexisting workflow for department directors, and now the notification I have set for leave applications is not working for them. However, the officers will receive when the leave application is rejected or approved.
I have tried multiple states, like Pending but still the department director role is not getting a notification, what am I missing here?

Here are the States I have defined

and here is the transition

The notification for leave application doctype looks like this:


apply the condition in py text box not next to the role also you should select one of the field dont select both like either select owner or select officers

also raise a new issue as this has been solved it makes it easier for other to find solution to certain issues

1 Like

I set that because not all roles will receive a notification. The directors will only receive notification when the officers apply for leave.

Can you please reply on the new issue I have created?