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

Ability to share responses / results #455

Closed
jancborchardt opened this issue Jun 12, 2020 · 26 comments · Fixed by #1461
Closed

Ability to share responses / results #455

jancborchardt opened this issue Jun 12, 2020 · 26 comments · Fixed by #1461
Labels
4. to release Ready to be released and/or waiting for tests to finish enhancement New feature or request feature: 📊 responses & statistics feature: 👥 sharing settings usability test Issues which came up in the usability testing session by Ura Design
Milestone

Comments

@jancborchardt
Copy link
Member

It would be great if not only the form creator could see the responses, but they could also be shareable via link, or to a group of other Nextcloud accounts.

(Splitting this off from the "Collaborative editing" #322 )

@skjnldsv
Copy link
Member

Seems a bit hard and lots of work no?
Maybe 3.0 ?

@jancborchardt
Copy link
Member Author

Let’s say 2.2 for now – it would be quite useful, and it’s better to properly assess it before. It was also said that making the summary stats page is hard. ;)

@tigexplorer
Copy link

It would be very nice, to add the optional ability to show the user after sending the form, the summary of the responses.

Also very helpful could be, to share a link to the responses of a form for non nextcloud users.

@dosch
Copy link

dosch commented Nov 2, 2020

or, if this proves hard; to share a form with a co-worker.
In this scenario I just help a colleague to make the form, then transfer ownership of the form to them.
This way they are also the owner of the answers.

@ostasevych
Copy link

Let me also add opposite requirement: to limit sharing responses with limited number of people.

@skjnldsv skjnldsv modified the milestones: 2.2, 2.3 Jan 21, 2021
@pebkacs
Copy link

pebkacs commented Feb 10, 2021

We are using forms for signups for a Minecraft server, and it works great. It would be ideal to be able to share the responses with the rest of the MC server admins without my intervention each time there is a response.

@ghost
Copy link

ghost commented Feb 11, 2021

Hi,

This feature has been asked during UX tests on my end, involving a situation where:

  • There's only one person in a team with a Nextcloud account ;
  • A public form is created and shared, meant to be filled by outsiders ;
  • The person wants to share the answers with their team without giving out their login credentials, nor requiring all members of their team to create a Nextcloud account.

This situation sounds similar to @pebkacs's as described in the comment above.

A sharing link for the responses view should answer those needs. Another solution would be to share the whole form (including the "questions" view) in read-only mode.

@biva
Copy link

biva commented Feb 12, 2021

Maybe a workaround to make it easier for a first step: create a link to download the latest version of the CSV. As a first step, this link can be public, and as a second step we could decide if it's limited to Nextcloud users or for a Nextcloud group.

@pebkacs
Copy link

pebkacs commented Feb 12, 2021

Maybe a workaround to make it easier for a first step: create a link to download the latest version of the CSV. As a first step, this link can be public, and as a second step we could decide if it's limited to Nextcloud users or for a Nextcloud group.

That is how I am working around the issue currently. However, the main issue is that now the data has to be synced or downloaded to each admin's personal machine where I cannot enforce security of that info. I also have to manually convert each file to an encrypted spreadsheet which breaks the ONLYOFFICE app compatibility. All that to say, if you do plan to do similar, make sure you take extra security measures to protect your data in the event one of your users with access to that data don't have the best security practices, or have their device stolen.

@EchoRPK
Copy link

EchoRPK commented Mar 12, 2021

Maybe a workaround to make it easier for a first step: create a link to download the latest version of the CSV. As a first step, this link can be public, and as a second step we could decide if it's limited to Nextcloud users or for a Nextcloud group.

That is how I am working around the issue currently. However, the main issue is that now the data has to be synced or downloaded to each admin's personal machine where I cannot enforce security of that info. I also have to manually convert each file to an encrypted spreadsheet which breaks the ONLYOFFICE app compatibility. All that to say, if you do plan to do similar, make sure you take extra security measures to protect your data in the event one of your users with access to that data don't have the best security practices, or have their device stolen.

Can you explain how you get this Public Link now? For the moment I´m only see the option to manually export the CSV to Files and share them. But I need an automatic export oder anonymous download link.

@jancborchardt jancborchardt added the usability test Issues which came up in the usability testing session by Ura Design label Jun 11, 2021
@flavour
Copy link

flavour commented Jul 2, 2021

Would be great to see this feature of being able to share form results live, without needing to export to CSV.
Is anyone working on this? If extra resource is needed, is anyone available to provide mentorship to help get it done?

@nivoliev
Copy link

nivoliev commented Jul 14, 2021

if that can be of some use to anyone as a workaround, I currently use the following small python app to query the app API and dynamically serve the csv file to share the results.

#!/usr/bin/env python3
from quart import Quart, Response
import hypercorn
from hypercorn.asyncio import serve

import yaml
import bs4
import aiohttp
import signal
import asyncio

##### Configuration #####

app = Quart(__name__)

parameters = None
with open('parameters.yaml', 'r') as f:
    parameters = yaml.load(f, Loader = yaml.FullLoader)

hypercorn_config = hypercorn.config.Config()
hypercorn_config.bind = parameters['bind_address']

##### Asyncio loop management #####

loop = asyncio.get_event_loop()

### shutdown management ###

shutdown_triggered = asyncio.Event()
loop.add_signal_handler(signal.SIGTERM, lambda : shutdown_triggered.set())
loop.add_signal_handler(signal.SIGINT, lambda : shutdown_triggered.set())

##### HTTP querying #####

### globals ###

session = None
session_available = asyncio.Event()
session_task = None

### management ###

#manage a global session object for querying http api
async def setup_session():
    global session
    global session_available

    async with aiohttp.ClientSession(cookie_jar=aiohttp.CookieJar(unsafe=True)) as s:
        session = s
        session_available.set()
        await shutdown_triggered.wait()

##### Credentials #####

credentials = None
with open('credentials.yaml', 'r') as f:
    credentials = yaml.load(f, Loader = yaml.FullLoader)

#### Queries ####

async def get_requesttoken():
    await session_available.wait()

    url = f"http://{parameters['nextcloud_address']}/apps/forms"

    r = await session.get(url, auth=aiohttp.BasicAuth(credentials['user'], credentials['password']))
    r.raise_for_status()
    html_answer = await r.text()
    token = bs4.BeautifulSoup(html_answer, 'html.parser').head['data-requesttoken']
    return token

async def get_submissions(form_id):
    token = await get_requesttoken()

    url = f"http://{parameters['nextcloud_address']}/ocs/v2.php/apps/forms/api/v1/submissions/export/{form_id}"

    headers = {
            'OCS-APIRequest': 'true',
            'requesttoken': token
            }

    r = await session.get(url, auth=aiohttp.BasicAuth(credentials['user'], credentials['password']), headers = headers)
    r.raise_for_status()
    answer = await r.text()
    return answer

##### Web app #####

#setup concurrent tasks
@app.before_serving
async def startup():
    global session_task
    session_task = loop.create_task(setup_session())

#ensure that concurrent tasks are gracefully shut down
@app.after_serving
async def shutdown():
    asyncio.gather(session_task)

forms = None
with open('forms.yaml', 'r') as f:
    forms = yaml.load(f, Loader = yaml.FullLoader)

#serve the web page
@app.route(f"/<form>.csv")
async def form_submissions(form):
    csv = await get_submissions(forms[form])
    response = Response(csv, mimetype='text/csv')
    return response

loop.run_until_complete(serve(app, hypercorn_config, shutdown_trigger = shutdown_triggered.wait))

This goes with three configuration files, you can gather everything in a single one, but this was easier for me. The file credentials.yaml has the form

user: <your nextcloud user here>
password: <your generated app password here>

the parameters to define the nextcloud url and the bind address of the resulting app in parameters.yaml

bind_address: <host:port, for instance : localhost:8000>
nextcloud_address: <your nextcloud url>

and finally the list of forms to serve is like

some_name: <form id>
some_other_name: <some other form id>
...

the csv will then be available by querying /some_name.csv.

@a-ly
Copy link

a-ly commented Jul 15, 2021

@nivoliev Thanks a lot for sharing!

@pohutukawa
Copy link

A possible solution could also be to transfer ownership of a form to a group (if something like that is even conceptually possible in Nextcloud). Then every group member could edit the form as well as view the results.

@pebkacs
Copy link

pebkacs commented Sep 28, 2021

Maybe a workaround to make it easier for a first step: create a link to download the latest version of the CSV. As a first step, this link can be public, and as a second step we could decide if it's limited to Nextcloud users or for a Nextcloud group.

That is how I am working around the issue currently. However, the main issue is that now the data has to be synced or downloaded to each admin's personal machine where I cannot enforce security of that info. I also have to manually convert each file to an encrypted spreadsheet which breaks the ONLYOFFICE app compatibility. All that to say, if you do plan to do similar, make sure you take extra security measures to protect your data in the event one of your users with access to that data don't have the best security practices, or have their device stolen.

Can you explain how you get this Public Link now? For the moment I´m only see the option to manually export the CSV to Files and share them. But I need an automatic export oder anonymous download link.

So sorry I did not see your reply sooner. I was exporting the CSV to another folder, and then sharing the link to the CSV file, not the form results directly since that is not an option currently.

@jotoeri jotoeri mentioned this issue Oct 3, 2021
@jotoeri jotoeri changed the title Ability to share responses Ability to share responses / results Nov 15, 2021
@DaleJP
Copy link

DaleJP commented Dec 3, 2021

I may be missing something as I am quite new to this, but as the infrastructure for live editing a file is already there in Collabora, couldn't a live .csv document just be populated by the forms app? Then you just need to adjust the ownership of the file? To be honest, the results page with sortable columns for us would be satisfactory as long as multiple users can have access to it.

I run a small nursery and we would like parents and staff to input a daily health check using a form and have the results accessible by admin staff. We then have to report it to the city and the CSV file export serves us well there.

@RenataGegaj
Copy link

Adding some feedback from the user testings here. Collaboration was the most required feature from all sessions. That includes the ability to collaborate on form creation and the ability to share form responses.
+1 on being able to share via link, to a group of other Nextcloud accounts or maybe even to external users(similar to a "Visitor" account on Google workspace)

Related to this, we encountered a usability issue while testing the Form Results screen. Participants were convinced that clicking on the "Share Link" button(screenshot below) would provide the link to the form results. Currently, that button copies the link for questions. Only a few participants were able to understand its functionality, and that was only after I followed up with questions about it. The way they tested this was by copying the link and pasting it in a different browser.

Screenshot 2022-01-21 at 14 30 31

@jotoeri jotoeri mentioned this issue Mar 22, 2022
@matthijskooijman
Copy link

Related to this, we encountered a usability issue while testing the Form Results screen. Participants were convinced that clicking on the "Share Link" button(screenshot below) would provide the link to the form results.

I was under the same impression, and was actually surprised to find this issue still open, since I was quite sure I had seen a button to share the results in the app just now. In fact, it seems that the button has moved since the above screenshot was made, and is now even more likely to be interpreted as a "share results" link:

image

Regardless, one way to implement this feature request that has not been mentioned yet, would be to implement saving results to a spreadsheet (#5) and then just use the existing readonly sharing link for spreadsheets with the results sheet. It might not be perfect in all cases, so also implementing a dedicated results share link might be useful in any case, of course.

@ueen
Copy link

ueen commented May 3, 2022

This would be really useful for compiling lists and avoiding duplicates and inform everyone about what's on the list
like when doing a dinner party and everybody writes what they want to bring, would be really useful :)

@MaxValue
Copy link

This app would be really useful as a simple anonymous feedback form for flat, decentralized organizations! But without the multi-user view-results feature it cannot be used for that.

@thom4parisot
Copy link

I would be super happy to benefit from this feature.

Has anybody found a workaround? To dispatch a result event to a shared spreadsheet, or CSV file or anything?

@christianlupus
Copy link

We would like to have the feature as well in our club: We want to share a link with the option to register for stuff to bring along for events (cake, finger food, ...). To avoid having 30x of the same food, it would be required that the users see the previous results.

I would be willing to have a look at the source code and see if I can make some way of public sharing via link happen. However, I would rather not do that against the better wishes of the maintainers. Doing the work and not getting the PR accepted seems not a good investment of time 😉.

@Chartman123
Copy link
Collaborator

There is already some progress going on where the results should automatically be written to a linked csv file. So I don't think that the "download csv" link should be made public for now.

@christianlupus
Copy link

I am not talking about making the CSV publicly available. I am talking about a page similar to the result page where one has a view of all results so far inserted into the app.

@Chartman123
Copy link
Collaborator

Sure, but as soon as the csv file will be updated automatically, you can easily share the results that way until the new sharing/permissions in version 3 will be extended to provide a more collaborative Forms app

@christianlupus
Copy link

Yes, as I said, a CSV is definitively no solution to my problem. I will have to wait for the updated version 3. Is there anything yet on the roadmap with a time schedule?

@susnux susnux added 4. to release Ready to be released and/or waiting for tests to finish and removed 1. to develop Accepted and waiting to be taken care of labels Jan 30, 2023
@jotoeri jotoeri modified the milestones: 3.3, 3.1 Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish enhancement New feature or request feature: 📊 responses & statistics feature: 👥 sharing settings usability test Issues which came up in the usability testing session by Ura Design
Projects
None yet
Development

Successfully merging a pull request may close this issue.