If you're enthused about CiviCRM Entity, we'd really appreciate contributions to the documentation.

Blog posts, writeups, README.md edits or docs issues / comments here are all good ways to help progress this module's use.

Thanks!

(this is a "support request" from developers to community. support us!)

Comments

eileenmcnaughton’s picture

How do I actually add a documentation page? I was going to note that with the entityreference_autocomplete module installed an autocomplete can be rendered by

$form[$entity]['assignee_contact_id'] = array(
'#type' => 'entityreference',
'#title' => t('Assign To'),
'#era_entity_type' => 'civicrm_contact',
);

upperholme’s picture

Issue summary: View changes

I'd be happy to help document this module, if I can first learn how to use it. Chicken/egg.

eileenmcnaughton’s picture

:-)

jkingsnorth’s picture

There are some useful comments about adding formatters in #2476759 comments #3+4. I'd be happy to add this to the documentation - but there doesn't seem to be anywhere to put it.

Is the documentation for this module going to sit here on Drupal.org (in which case a maintainer could create a page to start with and link it into the project page)

Or on the CiviCRM confluence wiki?

eileenmcnaughton’s picture

I'm inclined to say it should be on drupal.org - not too sure how to add a documentation page - or in the README.md file (which can be viewed on github)

jkingsnorth’s picture

I agree that d.org is probably a better place for it. The readme.md makes sense, but then PRs are required to change it. Might be better to have it just collaboratively editable on the Drupal handbook.

I can create a page if that's what we're going with, otherwise I'll add a PR for the README.

xurizaemon’s picture

Recommendations here on how to document Drupal modules "the Drupal way". ... not that I'm super fussy about this, but I agree John that making it collaboratively editable is better than needing PRs for improvements.

I've added a page @ https://www.drupal.org/node/2506765 and moved some docs across from the project page now.

Thanks & please make any improvements you can see!

Eileen - the note about "Upgrades" on the new docs page - does it belong at the top there? If it's specific to CiviCRM Entity upgrades, it might suit being moved to a Change Record?

jkingsnorth’s picture

Looks good, thanks xurizaemon

xurizaemon’s picture

It looks horrible! But at least it's all in one place.

I would like it to be a lot more coherent, and maybe have some subpages with a few recipes, but this was the next step.

  • xurizaemon committed 97b56aa on 7.x-2.x
    Issue #2122645 - Improve documentation
    
    Move documentation to CiviCRM...
joewickert’s picture

Just got basic rules firing from civirm_entity and hope this is useful feed back and the right place to post.

I found that the list of rules was confusing. For example when dealing with contacts we get the following action choices.

  • After saving a new civicrm contact
  • After updating an existing civicrm contact
  • Before saving a civicrm contact
  • CiviCRM Contact has been created
  • CiviCRM Contact has been deleted
  • CiviCRM Contact has been updated
  • CiviCRM Contact has been viewed

My experience is that i couldn't get the first action "After saving a new civicrm contact" to fire at all. But "CiviCRM Contact has been created" did what i expected-fired after a new civ contact was created.

Similarly, I couldn't get "After saving a new civicrm membership" to fire but "CiviCRM Membership has been created" did what I expected.

Only took me 2 weeks and several dev sites to work this out!

So I suggest making it clearer which options users need to select and which ones won't work as expected. Esp. since the ones that were unclear (to me at least) were listed first for each section.

markusa’s picture

Well you see the top 3 rules are not created by CiviCRM Entity.....CiviCRM Entity adds to the existing list the four rules:
CiviCRM [entity_type] has been created
CiviCRM [entity_type] has been deleted
CiviCRM [entity_type] has been updated
CiviCRM [entity_type] has been viewed

The others are generated by the Rules module itself, or Entity API....and it is not recommend to use these!

We want to use the CiviCRM [entity_type] rules for each entity, because these are invoked not only when a entity is created/edited/deleted in Drupal, but also when a user uses the CiviCRM administration backend and performs actions on entities.

I know it is confusing, but use the ones provided by CiviCRM Entity!!!!!

I'm all ears on what text to put in the ones provided by CiviCRM Entity, please I'm open to suggestions as to how to make this less confusing.

joewickert’s picture

I've added to the documentation page. Hopefully it makes it clearer for others to use the right events.

Maybe the events could be renamed:

"CiviCRM Entity [entity_type] has been created"

But I think making it clearer in the documentation is the main thing.

markusa’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Component: Code » Documentation
Assigned: Unassigned » markusa