Action "Fetch entity by property" needs to be ported to Rules 8.x-3.x.

Comments

mariancalinro’s picture

mariancalinro’s picture

Issue summary: View changes
dasjo’s picture

Title: Port "Fetch entity by property" to 8.0.x » Port "Fetch entity by property" action to D8
dasjo’s picture

hey mariancalinro,
thank you for working on this! do you have code that you can share? please link it in the issue and update the assigned field if appropriate.

dasjo’s picture

Assigned: mariancalinro » Unassigned
diarmy’s picture

Hey dasjo, I'll grab this one and post a link once I have some work to show you.

diarmy’s picture

Initial commit is here: https://github.com/diarmy/rules/tree/action-entity-fetch-9547355

Still lots to do obviously and I'll PR once it's ready for feedback.

dasjo’s picture

cool, glad to see you back diarmy! :)

a.milkovsky’s picture

@diarmy, you can have a look at the similar Port "Fetch entity by id" action to D8. That might help ;-)

diarmy’s picture

Hey @a.milkovsky,

That is immensely helpful, particularly the test setup(), so a huge thankyou!

@dasjo, it's good to be back.

diarmy’s picture

Status: Active » Needs review

Hi all

This is now ready for review: The PR is at https://github.com/fago/rules/pull/131

Many thanks.

dasjo’s picture

Status: Needs review » Needs work

setting to needs work based on the comments on the pull request

diarmy’s picture

Assigned: Unassigned » diarmy
diarmy’s picture

Status: Needs work » Needs review

Hi guys, I've made a few updates in accordance with the comments so this is ready for review again.

klausi’s picture

Status: Needs review » Needs work

Left a couple of comments on the pull request, mostly short array syntax. You should also merge in 8.x-3.x so that the travis ci tests pass again.

diarmy’s picture

Thanks, klausi. I've made those short array syntax corrections and merged in 8.x-3.x.

dasjo’s picture

Hi diarmy, could you update us about the status here? thanks

dasjo’s picture

Assigned: diarmy » Unassigned

Unassigning for drupaldevdays sprints, the latest can be found here
https://github.com/diarmy/rules/branches

diarmy’s picture

Assigned: Unassigned » diarmy

Hey dasjo, klausi pointed out a handful of array syntax issues last week which I corrected, so this may well be ready to merge. If not, please point out any other issues there may be with it. I am available to work on this today, so will re-assign to myself.

mikl’s picture

Status: Needs work » Reviewed & tested by the community

I've fixed the passing tests, new PR at https://github.com/fago/rules/pull/157 – could you take a look, maybe?

diarmy’s picture

Assigned: diarmy » Unassigned

Mikl, I'll unassign as it looks like you are doing a great job. Good luck!

mikl’s picture

Assigned: Unassigned » mikl

Ok, sorry for the confusion, I started working on it before your reply (#19) :)

klausi’s picture

Title: Port "Fetch entity by property" action to D8 » Port "Fetch entity by property" action to D8 and rename it to "Fetch entity by field"
Status: Reviewed & tested by the community » Needs review
mikl’s picture

It should all be done now, and the tests pass on Travis :)

  • klausi committed fb8df69 on 8.x-3.x authored by diarmy
    Issue #2317233 by diarmy, mikl: Port "Fetch entity by property" action...
klausi’s picture

Assigned: mikl » Unassigned
Status: Needs review » Fixed
Issue tags: +drupaldevdays

Merged, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

fago’s picture

Status: Closed (fixed) » Needs work

Re-opening for addressing the todo of refining provided entity context. Check the d7 info alter, implement like it's done for FetchEntityById (see refineContextDefinitions()) and add test coverage for it.

Anonymous’s picture

EntityFetchByField has the refineContextDefinition in it which fago wrote as an example, it is not fetch by id as suggested above. Please could you confirm what else is necessary on this action thanks.

bogdan.racz’s picture

Assigned: Unassigned » bogdan.racz
bogdan.racz’s picture

Assigned: bogdan.racz » Unassigned
Status: Needs work » Needs review

I've added a new pull request here: https://github.com/fago/rules/pull/294
I've added refineContextDefinitions() in the "fetch by id" action and tests for, also I've updated a found typo in testRefiningContextDefinitions in EntityFetchByFieldTest.
Please review.

klausi’s picture

Status: Needs review » Needs work

Looks mostly good, but the tests are failing. Looks like you forgot to rename something in the test?

mariancalinro’s picture

https://github.com/fago/rules/pull/294 is updated, and the tests pass

bogdan.racz’s picture

Status: Needs work » Needs review
klausi’s picture

Status: Needs review » Needs work

merge conflict in the pull request, can you resolve and push?

bogdan.racz’s picture

Assigned: Unassigned » bogdan.racz
Status: Needs work » Active
bogdan.racz’s picture

Assigned: bogdan.racz » Unassigned
Status: Active » Needs review

Fixed the merge conflict. Please review: https://github.com/fago/rules/pull/294

klausi’s picture

Status: Needs review » Needs work

Almost ready, left a comment there!

bogdan.racz’s picture

Status: Needs work » Needs review

Removed the unused use statement.

  • klausi committed c61ac21 on 8.x-3.x authored by rbmboogie
    Issue #2317233: Implemented data type assertions for "Fetch entity by...
klausi’s picture

Status: Needs review » Fixed

merged, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.