time off script Approve and Deny not working

199 views
Skip to first unread message

Hala Jalkh

unread,
Apr 14, 2020, 10:53:39 AM4/14/20
to Google Apps Script Community
I followed the instructions posted online on how to activate the time off request for vacation script. i followed all the steps correctly.

i receive an email when a form is submitted however when i click on approve or deny the url is not found.

Any assistance.

Thks

Alixe Lobato

unread,
Sep 2, 2022, 11:45:27 AM9/2/22
to Google Apps Script Community
I have the same problem, did you find the solution?

Andrew Roberts

unread,
Sep 4, 2022, 11:00:54 AM9/4/22
to google-apps-sc...@googlegroups.com
Can you give me a link to the tutorial and I'll take a look.

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/b593df2a-853b-4608-8f13-f6c2b9d6dbebn%40googlegroups.com.

Jim Willeke

unread,
Sep 5, 2022, 6:52:48 AM9/5/22
to Google Apps Script Community

Andrew Roberts

unread,
Sep 5, 2022, 10:23:11 AM9/5/22
to google-apps-sc...@googlegroups.com

Jim Willeke

unread,
Sep 6, 2022, 4:18:47 AM9/6/22
to Google Apps Script Community
Tell us what you have tried and show logs or results and 
  • what URL is in the code for the "SCRIPT_URL" value in your Apps Script file?
  • what is the URL you receive?
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Andrew Roberts

unread,
Oct 8, 2022, 4:08:02 AM10/8/22
to google-apps-sc...@googlegroups.com
Once you have deployed your copy of the script as a web app copy the URL (ending in /exec) into the WEB_APP_URL field in the __Settings tab.

On Fri, 7 Oct 2022 at 15:00, Joseph Martinez <jos...@mail.fresnostate.edu> wrote:
Hello, I am trying to accomplish my own automated time off request process as well and am having the same aforementioned difficulties with approval and denial of the requests. I have made a copy of your working version and linked it to my form accordingly, but I am not sure what you mean by copying the URL when creating the deployment as I can not edit the deployment URL that already exists. If you could offer any insight as to how I can resolve this issue I would greatly appreciate it!

Joseph Martinez

unread,
Oct 11, 2022, 8:19:38 AM10/11/22
to google-apps-sc...@googlegroups.com
Thank you Andrew! After doing this I was able to approve and deny the time off requests. I have now however run into another problem in the process, that of which being I can not see the requests populate in the calendar I have created. I made sure to link the calendar ID in the sheet, I also tried linking an existing calendar that has been used for the current manual time off requests just due to the fact that the calendar domain name of that one was different (it included our college's specific domain as it was created by a staff, I am merely a student assistant so my email address domain is slightly different) and that did not show the approved request either. Do you know what may be causing this issue?

Andrew Roberts

unread,
Oct 11, 2022, 9:52:07 AM10/11/22
to google-apps-sc...@googlegroups.com
If you have the correct ID here, I'm afraid I couldn't know what the issue is without debugging. Have you checked the log?

On Tue, 11 Oct 2022 at 13:19, Joseph Martinez <jos...@mail.fresnostate.edu> wrote:
Hello, I am trying to accomplish my own automated time off request process as well and am having the same aforementioned difficulties with approval and denial of the requests. I have made a copy of your working version and linked it to my form accordingly, but I am not sure what you mean by copying the URL when creating the deployment as I can not edit the deployment URL that already exists. If you could offer any insight as to how I can resolve this issue I would greatly appreciate it!

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.

Joseph Martinez

unread,
Oct 11, 2022, 2:27:31 PM10/11/22
to google-apps-sc...@googlegroups.com

Andrew Roberts

unread,
Oct 13, 2022, 4:40:36 PM10/13/22
to Google Apps Script Community
It was a silent and deadly bug! When the event was created it was using "leaveStartDate" and "leaveEndDate", whereas these properties were actually called "startDate" and "endDate".

Even though the dates were "undefined" the event was still being created without throwing an error, but with no valid dates it wasn't being displayed. 

So use "Manage Deployments" to update the web app URL and you should be good to go!


Andrew Roberts

unread,
Oct 13, 2022, 4:53:23 PM10/13/22
to Google Apps Script Community
Although, this may of not actually been a bug, but that the code was using the header names in the form response to derive the object properties, and changing these broke the code as "leavingStartDate" was hard-coded.

Joseph Martinez

unread,
Oct 13, 2022, 5:04:20 PM10/13/22
to google-apps-sc...@googlegroups.com
I have changed all of the "startDate" and "endDate" fields in the forms, sheet, and script to "leaveStartDate" and "leaveEndDate" and I am still receiving the same error message. The state and identifier fields do not populate with "pending" or identifier code.

Andrew Roberts

unread,
Oct 13, 2022, 5:12:00 PM10/13/22
to google-apps-sc...@googlegroups.com
Those two are ok now as  "start date" and "end date" as that is what is in the code now. Compare the other field names with those on the original sheet you took a copy of.

Joseph Martinez

unread,
Oct 13, 2022, 5:21:05 PM10/13/22
to google-apps-sc...@googlegroups.com
The other fields had been correctly changed. I had never gotten the script failure email before, are you sure you maybe didn’t edit the script incorrectly?

Andrew Roberts

unread,
Oct 14, 2022, 7:37:43 AM10/14/22
to google-apps-sc...@googlegroups.com
There were bugs in the code that were being overlooked by the old interpreter (Rhino), but now the code runs on V8 (an upgrade I had to do to debug it) they were being flagged up.

I fixed that latest issue (the manager's email was being returned as an array rather than a string), along with various variables that were being unnecessarily being left as global and did a test run on this sheet. Try it now.


Joseph Martinez

unread,
Oct 14, 2022, 10:49:08 AM10/14/22
to google-apps-sc...@googlegroups.com
Everything works smoothly! I had suspected the interpreter was outdated, but I was not sure how to upgrade this or what to even upgrade it to. Like I said, I have never coded before so I would not have been able to recognize the problems you did. Thank you for the assistance, I greatly appreciate it!

Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages