Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Follow-up to #2496563: Ability to clone a submission
Problems
Submission administrators should be able to 'Duplicate' submissions
Solution
Add ability to duplicate a submission.
Comment | File | Size | Author |
---|---|---|---|
#36 | 2857165-36.patch | 2.17 KB | jrockowitz |
#34 | 2857165-34.patch | 2.15 KB | jrockowitz |
#25 | 2857165-25.patch | 6.92 KB | jrockowitz |
| |||
#23 | 2857165-23.patch | 5.66 KB | jrockowitz |
#11 | Screen Shot 2018-01-19 at 9.52.34 PM.png | 71.17 KB | jrockowitz |
Comments
Comment #5
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedComment #7
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedComment #10
vunda CreditAttribution: vunda as a volunteer commentedHello, how I can get this functionally, cloning a submission from the webform.
Thanks,
Comment #11
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedOn the 'Results' tab, you just need to open a submission 'Edit' operations and click 'Duplicate'.
Comment #12
vunda CreditAttribution: vunda as a volunteer commentedI'm getting the message: "This webform is not available. Please contact the site administrator. "
Comment #13
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedDo you have the ability to update any submission?
Can you replicate this issue using https://simplytest.me?
Comment #14
vunda CreditAttribution: vunda as a volunteer commentedYes, I can edit any submission.
I'm using version: '8.x-5.0-beta23'. Maybe, that's the problem. If it's it, what would be the best steps to update the webform module (a stable version). I don't want to lose the survey form I built. Thanks.
Comment #15
vunda CreditAttribution: vunda as a volunteer commentedOk, I updated the webform to 8.x-5.0-rc1. Still no working: I'm getting the message: "This webform is not available. Please contact the site administrator. "
Comment #16
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedI think this is a permission issue.
Can you replicate this issue using https://simplytest.me?
Comment #17
vunda CreditAttribution: vunda as a volunteer commentedIt is working in https://simplytest.me
However, after I updated Drupal core version from D8.4.2. to D8.4.4 still no working.
The Admin (access) has all the privileges to create, edit, submit, delete...in the webform.
Any advice or suggestions.
Comment #18
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedYou need to figure out what is different on your local environment compared to simplytest.me.
Comment #19
vunda CreditAttribution: vunda as a volunteer commentedI did. The weird part is that the Webform Demos are working.
Comment #20
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedWhat are the permissions/access controls on your webform?
Comment #21
vunda CreditAttribution: vunda as a volunteer commentedOK, after updating D8.4.4 and Webforms modules; both are working as should be. However, I lost several fields/elements. I have to recreate several of them. note:
In terms of permission:
I found that "replicating" a webform submission works fine, if you have the right permission on your D8 roles and permission settings. However, webform has its own, but is not working the way I am expecting.
For instance, I attached some images: I have a role called Admin-Final, and I had to click the "Administer webform submissions" to be able to "Duplicate a webform submission". It works but if I go back to the webform submission or in my case a survey form, I can see "View, Test, Results, Build, Settings and References" Tabs (on top of my survey form).
https://ibb.co/mUxG8b
https://ibb.co/kybF1w
I do not want that. I only need the result or view to replicate a survey submission.
If I take the permission "Administer webform submissions" off, then it works, but in my view page where I have the option "Duplicate" it doesn't work. Because of this permission, I tried different ways to get it the way I want and I found that it is not possible.
Is there any way to include a permission to control only the "Duplication, or editing..." without giving access to the whole webform setting, like Build, Settings and REferences.
Maybe, I am missing something, if somebody has any idea.
Comment #22
vunda CreditAttribution: vunda as a volunteer commentedAfter selecting this option:
"Administer webform submissions
Warning: Give to trusted roles only; this permission has security implications. Note: To allow users to administer an individual webform's submissions, please go to the webform's 'Access' tab. Allows accessing, updating, and deleting all webform submissions."
When I go back to the webform submission or in my case a survey form, I can see "View, Test, Results, Build, Settings and References" Tabs (on top of my survey form).
I do not want that. I only need the result and view.
Comment #23
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedThere was an issue with the access checking for a submission's operations.
Please test the attached patch.
Comment #25
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedComment #27
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedI committed the patch. Please download the latest dev release to review.
Comment #28
vunda CreditAttribution: vunda as a volunteer commentedOK, thanks
Comment #29
vunda CreditAttribution: vunda as a volunteer commentedFirst error: The fte (webform_markup) is a webform element that can not have any child elements.
I was trying to copy my YAML file...
Comment #30
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedPlease see https://www.drupal.org/node/2938998
Comment #31
vunda CreditAttribution: vunda as a volunteer commentedI wondered if it is possible to include the "Duplicate" option
separately in the roles/permission. The reason is because I have breeders who
want to clone their report without copying the survey again. I have a problem
showing that functionally without exposing the Edit, Build, and other options
on top of my webform survey.
See video: https://youtu.be/bvbeeCmNsjc
Comment #32
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedThe patch makes it so that you just need to grant ‘update any submission’ to user.
Comment #33
vunda CreditAttribution: vunda as a volunteer commentedvideo: https://youtu.be/bvbeeCmNsjc
Comment #34
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedThanks for the video. I was not looking at the 'administer webform submission' permission checks. I was only looking at 'view any submission'.
Comment #36
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedComment #38
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedI committed the patch because it fixes a regression. Please download the latest dev release to review. If this solution does not fix your problem don't hesitate to update the ticket. Thanks for your patience.
Comment #39
vunda CreditAttribution: vunda as a volunteer commentedIt's working on my localhost, thanks for everything. I have to do some tests on the main website.
Thanks,
Comment #40
vunda CreditAttribution: vunda as a volunteer commentedJacob, thank you for all your help. It's working on a live website. So far permissions are working. I can control users permissions to see what they need to see the way I want it. This is perfect. I also fixed the problem of YAML child-elements errors. There are very easy ways to fix this problem. People don't need to recreate the whole webform. You can still use the existing YAML file and fix it. For instance if one of the elements is giving you an error, you can go back to the "build" and add the element that is causing the problem. After that go back to YAML, and keep working there. This is if you have saved all your webform in YAML.
Comment #41
vunda CreditAttribution: vunda as a volunteer commentedI found a second issue with permissions. The webform has an option called "View All Webform Submissions" I checked that box for users to see all the webform submissions. I can also do that by using role>permission (local permission) However, in the webform survey at the top of the beginning of the form I can see two tabs, one called "View" and one called "Result". I don't want users to see that.
It there any fix for this.
Thanks,
Comment #42
vunda CreditAttribution: vunda as a volunteer commentedI hope somebody can help with these topics:
Running Drupal 8 and Webform 8.x-5.0-rc1+75-dev (2018-Jan-29)
I have a problem showing View and Results after clicking on my webform survey.
On top of my form I can see two tabs. This is a problem because I can see all the records from other submissions.
I want to eliminate these tabs
This is the problem:
Image 1 shows tabs "View" and "Results (Also, I can see all the results or records by clicking on the Result tab).
https://imgur.com/a/g7saR
I want to eliminate these tabs.
This is correct but for some reason, after giving the right permission, it interferes with the webform permission (see image 1).
The second image shows my own webforms submissions result(s). It has access to duplicate/edit/delete my own webforms submissions.
https://imgur.com/a/g7saR
The third image shows a css class "Active"
Any suggestions,
Thank you
Comment #43
vunda CreditAttribution: vunda as a volunteer commentedThis option from permission is not working
Administer webform submissions
Warning: Give to trusted roles only; this permission has security implications. Note: To allow users to administer an individual webform's submissions, please go to the webform's 'Access' tab. Allows accessing, updating, and deleting all webform submissions.
It gives you full access, after that you click your own webform and shows VIEW and Results plus all the results from others users.
Too bad, it is the only one we have to display Edit/View/Duplicate
Any idea how to fix this....
Comment #44
vunda CreditAttribution: vunda as a volunteer commentedHow to implement a hook for the "Operations link" drop-down menu (Edit, view, notes, duplicate and delete)?