update milestone status using deluge

update milestone status using deluge

one thing that would make projects much cleaner is an option to complete milestones if all task are completed. this would keep the projects clean and focused especially on the mobile app.

with that said i have attempted to write a script in deluge to check for all task completed and then update the milestone to completed. 

i am using the function zoho.projects.updated located here: https://www.zoho.com/deluge/help/projects/get-record-by-id.html

i have also referenced the api guide on parameters to update a milestone located here: https://www.zoho.com/projects/help/rest-api/milestones-api.html#alink4

i have this all working. the issue is the api call to update the "status" is different, when i pass the "status" field into the map of values it does not update the status, i tried passing text "completed" and integer 2.

milestoneMap = Map();
milestoneMap.put("name",mName);
milestoneMap.put("start_date",mStartDate);
milestoneMap.put("end_date",mEndDate);
milestoneMap.put("owner",milestone.get("owner_id"));
milestoneMap.put("flag",mFlag);
milestoneMapStatus.put("status",2); // this is where i have the issue, on the UPDATE function it does not pass this value through
mileStoneResponse = zoho.projects.update("fieldsbrothers",pID,"Milestones",mID,milestoneMap);
info "mileStoneresponse " + mileStoneResponse;

i am not sure how to invoke: 
 Update Milestone Status
POST  /portal/[PORTALID]/projects/[PROJECTID]/milestones/[MILESTONEID]/status/

using a deluge function?

can you please help me with the syntax?




                            Zoho Desk Resources

                            • Desk Community Learning Series


                            • Digest


                            • Functions


                            • Meetups


                            • Kbase


                            • Resources


                            • Glossary


                            • Desk Marketplace


                            • MVP Corner


                            • Word of the Day



                                Zoho Marketing Automation


                                        Manage your brands on social media



                                              Zoho TeamInbox Resources

                                                Zoho DataPrep Resources



                                                  Zoho CRM Plus Resources

                                                    Zoho Books Resources


                                                      Zoho Subscriptions Resources

                                                        Zoho Projects Resources


                                                          Zoho Sprints Resources


                                                            Qntrl Resources


                                                              Zoho Creator Resources


                                                                Zoho WorkDrive Resources



                                                                  Zoho Campaigns Resources

                                                                    Zoho CRM Resources

                                                                    • CRM Community Learning Series

                                                                      CRM Community Learning Series


                                                                    • Tips

                                                                      Tips

                                                                    • Functions

                                                                      Functions

                                                                    • Meetups

                                                                      Meetups

                                                                    • Kbase

                                                                      Kbase

                                                                    • Resources

                                                                      Resources

                                                                    • Digest

                                                                      Digest

                                                                    • CRM Marketplace

                                                                      CRM Marketplace

                                                                    • MVP Corner

                                                                      MVP Corner

                                                                    





                                                                    




                                                                        Design. Discuss. Deliver.

                                                                        Create visually engaging stories with Zoho Show.

                                                                        Get Started Now