Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workflow upload image and set person photo not working to change avatar #5698

Closed
2 tasks done
karenn-ccbc opened this issue Dec 19, 2023 · 9 comments
Closed
2 tasks done
Labels
Fixed in v16.3 Status: Confirmed It's clear what the subject of the issue is about, and what the resolution should be. Type: Bug Confirmed bugs or reports that are very likely to be bugs.

Comments

@karenn-ccbc
Copy link

Description

I have a workflow that I have used in the past to upload a file or image and then set the person's photo in the workflow to the newly uploaded image. This worked in the past but with the new avatars the image is not changing on the person details page, but if you edit the person the photo is there. Here is a discussion with Jim Michael on Rocketchat https://chat.rockrms.com/channel/general?msg=hWbfquBXhLFyTGtMh
This appears to be a related error that shows to be corrected in v16.0, but Jim confirmed the workflow error is still not working in 16.1 #5579

Actual Behavior

The avatar is still showing ( v 15.2) or it is showing a broken image (in v 15.1 - Rock Demo)
image
image

image
image

Expected Behavior

I would expect the person's image on the person details to display the new image.

Steps to Reproduce

Create a workflow and add a file or image type linked to a particular file type that matches the settings of the Person Image file Type.
Upload a person photo in the workflow
Go to the person's page and see the missing photo on their details page.
Edit the person and see that the image is there.

Issue Confirmation

  • Perform a search on the Github Issues to see if your bug or enhancement is already reported.
  • Try to reproduce the problem on a fresh install or on the demo site.

Rock Version

15.2 and confirmed in 16.1

Client Culture Setting

en-US

@JimMichael
Copy link
Collaborator

I just realized that in my test workflow for this, I FORGOT to select the File Type (and it's kinda crazy that the UI lets you save the Image attribute without an associated File Type... but it does).

Anyway, once I selected my Person Image file type (which for us stores in Cloudinary), uploading an image via the workflow worked as expected, and the Person Photo on their profile was instantly updated (whereas previously it was an avatar).

So whatever is broken, it's not broken for EVERY file type.

Note my tests were with 16.1 alpha2

@karenn-ccbc
Copy link
Author

karenn-ccbc commented Dec 19, 2023

Thank you Jim for the additional clarification below and I will add a little more context as well to our situation.

We are trying to use a different file type SO THAT i can collect the files in a different location to easily pull the files for us to use in a publication and need to send those files to our Creative Arts dept. So I am trying to use one file type to upload the files to and then set the person photo to that file ( or duplicate it to the person photo file type if necessary). I would need an additional action I suppose to do that.

@karenn-ccbc
Copy link
Author

I confirmed in pre-alpha demo site that if you use the Person Image file type then it sets the person's photo correctly, but if I use a different file type to capture the upload it does not set the person image.
I tried creating another workflow attribute of the person image file type and setting that attribute to the photo image that was uploaded in order to be able to set that on the person and that did not work. I would need some lava or other way to duplicate the image to 2 types.

@chead4
Copy link

chead4 commented Dec 20, 2023

@karenn-ccbc Hi Karen. I quickly made an export of your workflow yesterday but I am not able to recreate your issue. Could you create a video that includes your workflow settings and include the Profile page that shows the person image displayed after the workflow is run?

@karenn-ccbc
Copy link
Author

@chead4 I am wondering if you exported the one where I set the file type to Person Image, that works. When I create a new file type linked to a new file folder that is where I see the issue. I have this in prealpha now--
I added a file type of Photo Upload.
In Workflow https://prealpha.rocksolidchurchdemo.com/page/136?WorkflowTypeId=29 I have the uploaded file going to this new file type. (instead of Person Image)
I am uploading an image to Tim Greggs record.
I created a screen capture recording of me uploading the image and it not showing on his person details record, but if you edit you can see that it is there. https://vimeo.com/896695911/a58a3bb3fe?share=copy

@chead4
Copy link

chead4 commented Dec 20, 2023

@karenn-ccbc Thank you for getting back to me so quickly. The creating of a new file type was the detail that I was missing as I was testing with a different one already in the list. I am able to recreate the issue and have all the details that I need now.

@sparkdevnetwork-service sparkdevnetwork-service added Type: Bug Confirmed bugs or reports that are very likely to be bugs. Status: Confirmed It's clear what the subject of the issue is about, and what the resolution should be. labels Dec 20, 2023
@JimMichael
Copy link
Collaborator

After thinking about this some more, I'm now very curious on what the outcome will be. It SEEMS like setting the Person Photo to a File Type different than Person Photo would be a "bad thing", because by doing so you're basically "forking" where Person Images are stored... via the Profile Page they would be images of type Person Photo but via Workflow (and intentionally choosing a different File Type) they would be of type Something Else

Recognize that a "copy" of the binary file is not being made here... both the Workflow attribute and the Person Photo point at the same binary file (as far as I'm aware)... so while Rock seems to be smart enough to handle such situations (and keep track of which specific photo is of which File Type), it also seems like a Bad Idea(tm).... maybe?

Anyway, can't wait to hear how the core team weighs in.

@karenn-ccbc
Copy link
Author

@JimMichael I have thought about that and understand the implication. If I can figure out how to store the uploaded photo in 2 places I would. Can you tell me if that is possible in the worflow. I tried to copy the file and save it in 2 places or both file types, but have not yet been able to figure out how.

@karenn-ccbc
Copy link
Author

So just an additional comment here. I understand Jim's concern and if I upload the image to the Person Image file Type it sets the avatar, but I am having trouble trying to set another file type from that (saving the file in another location). If I upload another file type and then try to set the person image file type from that, it adds the person image, but does not change the avatar. Ultimately, I need the image file in 2 places: set as the Person Image AND as another file type and preferably that file renamed to the person's name in the workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in v16.3 Status: Confirmed It's clear what the subject of the issue is about, and what the resolution should be. Type: Bug Confirmed bugs or reports that are very likely to be bugs.
Projects
None yet
Development

No branches or pull requests

5 participants