Add a date to a CB Field

14 years 7 months ago #110753 by krileon
Replied by krileon on topic Re:Add a date to a CB Field
toddfletcher wrote:

Thank you for assisting me. I look forward with anticipation on a patch for this bug. Please let me know if I can offer any other assistance, etc...

Would this be the type of fix that would roll into the release minor or major release?

Thanks again!

Todd


Hopefully will be added to CBSubs 1.0.3 timeline, but as is I'm unsure. It's not too high priority as only backend is having the issue. The queries fire properly on frontend.

Post edited by: krileon, at: 2009/09/10 16:03


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

14 years 7 months ago #110848 by krileon
Replied by krileon on topic Re:Add a date to a CB Field
Through further investigation the problem has been revealed as a non-issue.

When saving in backend you're saving the _user and _comprofiler table and before that you're trying to run your query which modifies the comprofiler table. The issue is your query changes are being overwritten with those from backend saving.

What it comes down to is if you're going to modify the comprofiler table then please use CBSubs Fields as this is its intended purpose. Do not use SQL Actions to modify the comprofiler/user tables IF you intended to give users subscriptions from User Management (use Import feature if going to give subscriptions from backend with SQL Actions modifying these tables).

CBSubs Fields will allow you to modify fields values on an easy to use way with additional features such as adding a value, subtracting a value, etc...


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

14 years 7 months ago #110862 by toddfletcher
Replied by toddfletcher on topic Re:Add a date to a CB Field
Ok. Thanks for the follow up. I tried using that area first. But wasn't able ot figure out what to enter into the value. What do I put into the value field that will set a date field to the current date?

Thanks.

Todd

Please Log in to join the conversation.

14 years 7 months ago #110866 by krileon
Replied by krileon on topic Re:Add a date to a CB Field
You can try DATE_FORMAT( CURDATE(), '%Y-%m-%d' ), but don't know if this will work. Otherwise manually enter the information 0000-00-00 00:00:00.

The other option is to stop giving users subscriptions from User Management and you'll be fine. Use CBSubs Import.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

14 years 7 months ago #110913 by toddfletcher
Replied by toddfletcher on topic Re:Add a date to a CB Field
Oh... It finally clicked that you are saying that the SQL query works fine as long as the subscription is set from the front end.

I tried this..

UPDATE `jos_comprofiler` SET `cb_workshop001` = DATE_FORMAT( CURDATE(), '%Y-%m-%d' ) WHERE `user_id` = [user_id]

AND IT WORKED!!!

Thank you SOOOOOO much for being patient and helpful with this issue. This makes me very excited. This is the feature that made me drop JoomSuite and go with CommunityBuilder. AND IT WORKS!!! THANKS!!!

:laugh: :laugh: :laugh: :laugh: :laugh: :laugh:

Todd...

Please Log in to join the conversation.

14 years 7 months ago #110918 by krileon
Replied by krileon on topic Re:Add a date to a CB Field
toddfletcher wrote:

Oh... It finally clicked that you are saying that the SQL query works fine as long as the subscription is set from the front end.

I tried this..

UPDATE `jos_comprofiler` SET `cb_workshop001` = DATE_FORMAT( CURDATE(), '%Y-%m-%d' ) WHERE `user_id` = [user_id]

AND IT WORKED!!!

Thank you SOOOOOO much for being patient and helpful with this issue. This makes me very excited. This is the feature that made me drop JoomSuite and go with CommunityBuilder. AND IT WORKS!!! THANKS!!!

:laugh: :laugh: :laugh: :laugh: :laugh: :laugh:

Todd...


Glad I could be of help. A tip for adding a subscription in the backend. Use CBSubs Import and all triggers are guaranteed to fire without interference from other plugins or from other triggers. ;)


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.194 seconds