vanderbilt-redcap / cross-project-piping-module

Cross-Project Piping pipes from one field in one project into another field in another project. This project does not currently have a support budget that allows responses to issues.
MIT License
10 stars 7 forks source link

"Pipe All Records" button not working #21

Closed nsonanh closed 1 year ago

nsonanh commented 1 year ago

Hi, I'm having an issue with piping records using the Pipe All Records button in Record Status Dashboard page.

Now for simplicity let's say I have project A and project B.

Apparently no field was piped. If I open the form in project B I can see that fields can be piped when the form loads. However I'd need them to be automatically piped when I click the button.

Does anyone have any advice on how I can do it ? Any help would be greatly appreciated. Thanks!

nsonanh commented 1 year ago

I'm using version v1.4.10 btw

WangiMw commented 1 year ago

Hi, I am having the exact issue and I can not seem to find the solution. I hope someone will come to the rescue soon

mmcev106 commented 1 year ago

We unfortunately haven't had a team willing to offer a general support budget for this module in years, which a requirement before we can log time on something. @tertek, I might loop you in since you've shown interested in this module recently.

nsonanh commented 1 year ago

FYI, the issue appears to be on line 956 of file CrossprojectpipingExternalModule.php (here). Somehow the module failed this check while it runs. If I updated the check to do nothing then the pipe-all button works correctly.

WangiMw commented 1 year ago

FYI, the issue appears to be on line 956 of file CrossprojectpipingExternalModule.php (here). Somehow the module failed this check while it runs. If I updated the check to do nothing then the pipe-all button works correctly.

Did you just comment it out?

nsonanh commented 1 year ago

Did you just comment it out?

If you comment it out the EM will throw an error. So I update it to do nothing, like this:

if (in_array($eid, (array) $source_project['valid_match_event_ids']) === false) {}

You will need to manually make the change inside Redcap modules folder, there's no change to the current code base.

Obviously this check has a purpose, I'm still studying it to understand the rationale behind and hopefully to make a fix PR.

nsonanh commented 1 year ago

I attempt to fix in PR #23. @mmcev106 please see if we can include it in.

mmcev106 commented 1 year ago

@nsonanh's PR has been merged & included in version 1.4.12! I suspect there are still cases where the button does not work properly, but at least we fixed a few of them. I'll close this for now.

harpsicord86 commented 1 year ago

Hi @mmcev106 and @nsonanh,

Unfortunately, I seem to be having the same issue... Pipe All Records button seems to do nothing... I've not got any repeating instruments in my destination project but the auto-piping/piping button in record seems to work fine. I'm on v1.4.18 - REDCap version 13.2.3

nsonanh commented 1 year ago

Hi @harpsicord86, Could you be a bit more specific on the setup of your projects?

Upon testing again I can see that the pipe-all button does work (at least for normal records):

image

I'm using v1.4.18 - REDCap version 12.0.7

harpsicord86 commented 1 year ago

Hi @nsonanh I have two projects linked together using this EM... however, for operational reasons, I can't associate the matching of records using the record ID - I'm using a reference number which is used between the projects. Normal automatic data piping works fine with when clicking on a single record but it does not seem to work when using the pipe all records button. I'm certain that I've set it up correctly as the auto piping wouldn't have worked?!

Also its worth noting that I am trying to pipe data in an already populated form.

nsonanh commented 1 year ago

Hi @harpsicord86 It's strange that I tried to have a similar set up to yours and it's still working for me. I also updated my Redcap version to 13.2.3 too. I'll provide some screenshots of my module config values and records for you: image image image

harpsicord86 commented 1 year ago

Hi @nsonanh I believe I may have a working theory as to why my cross-project piping is not working... I think it is because I'm trying to get data from within a separate event. I've only realised this after trying to attempt to copy data from a consent form between projects and the consent form is actually part of another event... could this be a potential bug?

mmcev106 commented 1 year ago

@harpsicord86, that very well could be a bug. I'm not sure @moorejr5 or anyone else would have time approved to look it, but I'd love to keep track of it for whenever someone is able to rise to the occasion. If/when you're confident in your testing, would you mind creating a new issue describing the scenario?