Jump to content


Photo

Workflow and custom date fields

mergetags merge tags tags date custom fields custom

  • Please log in to reply
6 replies to this topic

#1 riwern

riwern

    Member

  • Members
  • PipPip
  • 16 posts

Posted 22 December 2013 - 11:56 AM

When using the on-save workflow type I think I may have found a bug regarding updating date fields.

 

Version: 2.5.8 (locally hosted)

 

Steps to reproduce

1. Create custom date field under Accounts "acctDateCstm"

2. Create custom text field under Accounts (to show that the field in step 3 works) "acctDateTxtCstm"

3. Create custom date field under Products "prodDateCstm"

4. Create Workflow to trigger on a product new and update with the following specifics:

4a. Module: Products

4b. Trigger: prodDate Is Not Empty

4c. Actions: Update Related Accounts (with the following field updates)

                       - accDateTxt AS [[PRODDATE^CSTM]]

                       - accDate Specifically on [[PRODDATE^CSTM]]

5. Create Product with a date in prodDate and save.

 

Result

The workflow will run and produce the following result:

accDateTxt = prodDate

accDate = date of workflow save

 

What seem to happen is that when the workflow is saved (maybe even run?) the (merge) tag is replaced in the SQL by the current date and not the tag itself. Next time a product is created or updated the date updated to account will always be the static date the workflow was saved.

 

 

I'm guessing this is a bug and not the intended behavior.

 

 

--Richard



#2 raysto

raysto

    Zurmo Team

  • Administrators
  • 1,973 posts

Posted 22 December 2013 - 10:03 PM

can you reproduce this in the Live Demo: http://demo.zurmo.co...o/default/login


Ray Stoeckicht
Zurmo Team
Try Zurmo Pro


#3 riwern

riwern

    Member

  • Members
  • PipPip
  • 16 posts

Posted 27 December 2013 - 09:38 PM

Yes, I forgot to mention that this was also tested in the Live Demo (2.5.8).

I haven't found a way around this and I'm not good enough with the code to do some actual debugging, so I can only give you the "symptoms" of the issue.

 

Let me know if you need more examples or use cases.



#4 raysto

raysto

    Zurmo Team

  • Administrators
  • 1,973 posts

Posted 30 December 2013 - 12:03 AM

Thanks for bringing this up. You can track here.


Ray Stoeckicht
Zurmo Team
Try Zurmo Pro


#5 speixoto

speixoto

    Advanced Member

  • Members
  • PipPipPip
  • 386 posts

Posted 08 January 2014 - 07:19 PM

This is not a bug.

 

For now, in workflows, when updating a date or dateTime field we only have 3 options: "Specifically on", "Dynamically From Triggered Date" or "Dynamically From Existing Date". The first one is a static date/dateTime. The others are determined dynamicly based on the date when the workflow was triggered or the exisiting value of the date/dateTime field.

 

Neither of this options allows to use merge tags, so we cannot use them here. Moved the story to a feature request to allow this use case.



#6 riwern

riwern

    Member

  • Members
  • PipPip
  • 16 posts

Posted 09 January 2014 - 09:10 AM

Ok, thank you for clearing that up. I was under the (false) impression that I was able to use mergetags in those fields as well.

 

I think this feature would help workflows in a subscription based organization. Can think of a couple of use cases where you update a customer/contact field with a new/updated product (subscription "sale").

 

Having a date field instead of a text field makes filtering in reports that much easier...

 

Thanks again.



#7 riwern

riwern

    Member

  • Members
  • PipPip
  • 16 posts

Posted 09 January 2014 - 09:15 AM

Moderators: please move this thread to the feature requests subforum.







Also tagged with one or more of these keywords: mergetags, merge tags, tags, date, custom fields, custom

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users