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

Data sources - "tweets" is always used to describe the content for the "Import to survey" field #3531

Closed
Erioldoesdesign opened this issue May 7, 2019 · 18 comments · Fixed by ushahidi/platform-client#1426
Assignees
Labels
Bug Codebase: Client Indicates issue work will be in client Community Task Issues that the Ushahidi OSS community is encouraged to contribute to first-timers-only I’m willing to hold your hand so you can make your first PR. This issue is a bit easier than normal. Hacktoberfest Issues open to folks participating in hacktoberfest Theme: Data Providers

Comments

@Erioldoesdesign
Copy link

Erioldoesdesign commented May 7, 2019

Describe the bug
When setting up data sources, the data source type is hardcoded and is always "tweets" instead of the correct data source type.

Where was the bug observed
Personal test deployment: https://lgbthistoryswuk.ushahidi.io/views/map

To Reproduce
Steps to reproduce the behavior:

  1. Go to a deployment you have admin access to
  2. Log in as 'an admin'
  3. Click on 'settings'
  4. Scroll down to 'data sources'
  5. Choose 'email', or any of the SMS data sources
  6. Toggle on 'Accept survey submissions from this source'
  7. Toggle on 'Import to survey'
  8. In the text that says 'Choose what should be assigned to each survey field
    Each of the survey's fields are listed below. Choose the data from your tweets that you'd like to use to populate each of those fields.'

Expected behavior
The data source type shown in the description should match the one the user is looking at.
It should read

  • For the Twitter data source: Each of the survey's fields are listed below. Choose the data from Twitter that you'd like to use to populate each of those fields.'
  • For the Email data source: Each of the survey's fields are listed below. Choose the data from Email that you'd like to use to populate each of those fields.'
    .. etc ...

Is there a workaround? What is it.
No

Screenshots

Screenshot 2019-05-07 at 12 45 22

URL / Environment where this happened
Any ushahidi.io or testing environment with Ushahidi V3 or V4

Desktop Hardware Details (please complete the following information):

  • Applies to any OS
  • Applies to any browser

Working on this issue

Implementation notes

Changes required (first timers only)

  • in the en.json file, look for the key "choose_survey_field_desc" and replace its value with
"Each of the survey's fields are listed below. Choose the data from {{datasource_type}} that you'd like to use to populate each of those fields.",
  • in the datasources.html file, look for the p with the translation key "survey.choose_survey_field_desc" and replace that

    with

<p translate-values="{datasource_type: provider.name}" translate="survey.choose_survey_field_desc">Each of the survey's fields are listed below. Choose the data from your tweets that you'd like to use to populate each of those fields.</p>

Ping @rowasc if you need help with this issue!

@Erioldoesdesign Erioldoesdesign added Bug Community Task Issues that the Ushahidi OSS community is encouraged to contribute to P4 - Wishlist good-first-issue Issues that are ideal for first time contributors to OSS or first time contributing to the platform labels May 7, 2019
@rowasc rowasc changed the title Typo in email data source text Data sources - "tweets" is always used to describe the content for the "Import to survey" field Aug 16, 2019
@rowasc rowasc added first-timers-only I’m willing to hold your hand so you can make your first PR. This issue is a bit easier than normal. WSC Codebase: Client Indicates issue work will be in client and removed good-first-issue Issues that are ideal for first time contributors to OSS or first time contributing to the platform P4 - Wishlist wsc2019 labels Aug 16, 2019
@rowasc rowasc added the Hacktoberfest Issues open to folks participating in hacktoberfest label Sep 28, 2019
@Jenniline
Copy link
Contributor

Jenniline commented Nov 30, 2019

Hi, @rowasc I saw this and I am interested in it.
I will like to be assigned this issue.
I have already begun working on it. I have a question on the location of the data sources .html file.
I don't seem to find it in the DataSources folder.
I am almost finished working on the issue.
Thanks

@Jenniline
Copy link
Contributor

Jenniline commented Nov 30, 2019

Hi @rowasc,
I have made a Pull Request on this issue.
Jenniline/platform-client#1
The Pull Request is on the edit in the en.json file
Please review it.

Nevertheless, I still need help with finding the datasources,html file.

Thanks

@ritesh-pandey
Copy link

ritesh-pandey commented Dec 2, 2019

Hi, @rowasc I saw this and I am interested in it.
I will like to be assigned this issue.
I have already begun working on it. I have a question on the location of the data sources .html file.
I don't seem to find it in the DataSources folder.
I am almost finished working on the issue.
Thanks

@Jenniline Second change requires editing in this file.
/app/settings/datasources/datasources.html

@Angamanga
Copy link
Contributor

@Jenniline Thank you for looking into this. @ritesh-pandey is right (thanks for helping out!), the files related to datasources are found here: https://github.com/ushahidi/platform-client/tree/develop/app/settings/datasources

@Jenniline
Copy link
Contributor

Thanks @Angamanga and @ritesh-pandey. I have viewed the file and I have made the necessary changes.
@Erioldoesdesign and @rowasc I have made a pull request for this issue here are the links
for the en.json file: Jenniline/platform-client#1
for the datasources.html file: Jenniline/platform-client#2.

Please review it.
In addition, I will also like to be assigned this issue.
Thanks

@rowasc
Copy link
Contributor

rowasc commented Jan 7, 2020

Thanks @Jenniline . We'll review it and get back to you 🎉 thank you !

@Angamanga
Copy link
Contributor

@Jenniline Thank you! Could you start with updating your fork with the newest changes in Ushahidis Platform-client-repo (a guide on how to do that can be found here: https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/merging-an-upstream-repository-into-your-fork) and then make a pull-request into this repo rather than into your own (a guide about that is found here: https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork)? Thank you :)

@Jenniline
Copy link
Contributor

Hi @Angamanga I have updated my fork and made the pull Request please review and let me know thanks

@Angamanga
Copy link
Contributor

@Jenniline I don't find the pull-request, can you please try to open it again? Thank you 🎉

@Jenniline
Copy link
Contributor

Hi Anna, here is the link to the branch
https://github.com/Jenniline/platform-client/pull/4/commits
This time I made the commits consisting the changes to the 2 files in 1 branch. Since you once told me it is better to manage that way.

@Angamanga
Copy link
Contributor

@Obadha2 Can you QA in Steve buscemi please? 🙏
Testing checklist:

  • As logged in admin, go to settings->datasources
  • Toggle on 'Accept survey submissions from this source'
  • Toggle on 'Import to survey' (You may need to add data in each field in the datasource before these toggles appear, it doesn't need to be correct credentials :D )
  • The text should says 'Choose what should be assigned to each survey field
    Each of the survey's fields are listed below. Choose the data from your [[THE NAME OF THE SELECTED DATASOURCE HERE]] that you'd like to use to populate each of those fields.'

@Angamanga Angamanga reopened this Feb 12, 2020
@AmTryingMyBest
Copy link
Contributor

This fails QA.
It says " Choose the data from that you'd like to use......."
See attached screenshot:
Screenshot 2020-02-17 at 1 55 07 PM

cc @Jenniline @Angamanga

@Jenniline
Copy link
Contributor

Hi @Obadha2
Alright, let me look into it again.
Any tips or ideas on what I can do?
Thanks

@Angamanga
Copy link
Contributor

Ah, I missed this! So @Jenniline there is a few things that needs to be done:

  1. Change "{ provider: provider.name }" to "{ datasource_type: provider.name }" here: https://github.com/ushahidi/platform-client/blob/develop/app/settings/datasources/datasources.html#L77 (this is so that the translation values is mapped correctly in en.json.
  2. Add back translate="survey.choose_survey_field_desc" as well to this row: https://github.com/ushahidi/platform-client/blob/develop/app/settings/datasources/datasources.html#L77 (instead of translate="")
  3. On row 120, https://github.com/ushahidi/platform-client/blob/develop/app/settings/datasources/datasources.html#L120, add "{ datasource_type: provider.name }" in the same way as on row 77.

@Jenniline
Copy link
Contributor

Alright @Angamanga I will do them.

@Angamanga Angamanga mentioned this issue Mar 2, 2020
1 task
@Angamanga
Copy link
Contributor

@Obadha2 Could you recheck in Steve Buscemi please 🙏 ?

@Jenniline
Copy link
Contributor

Hi Anna,
I have looked into this issue again and what I have realised is that; In the datasources.html file, the changes you recommended already exists. you can see that here https://github.com/ushahidi/platform-client/pull/1442/files

In the en.json file, the issue there is that, the sentence does not make sense what I mean is it looks like this on line #316 "Each of the survey's fields are listed below. "Choose the data from {{datasource_type}} that you'd like to use to populate each of those fields."

But it is displayed on the Platform-client this way: "Each of the survey's fields are listed below. "Choose the data from that you'd like to use to populate each of those fields."

There is an omission between from and that because the code ({{datasource_type}}) cannot be displayed.

So then in the pull requests I have just made, I removed the {{datasource_type}} and replaced it with data source type. more of the description is in the pull request. Here is the link Jenniline/platform-client#7.

Please review and let me know Thanks

@AmTryingMyBest
Copy link
Contributor

This passes QA. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Codebase: Client Indicates issue work will be in client Community Task Issues that the Ushahidi OSS community is encouraged to contribute to first-timers-only I’m willing to hold your hand so you can make your first PR. This issue is a bit easier than normal. Hacktoberfest Issues open to folks participating in hacktoberfest Theme: Data Providers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants