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

Fix error messaging for schedule alert #201

Closed
mcverter opened this Issue Dec 10, 2016 · 7 comments

Comments

Projects
None yet
2 participants
@mcverter
Contributor

mcverter commented Dec 10, 2016

When User Schedules an alert correctly the Error Messages don't appear correctly on the scheduleAlertModal

This is because of a mistake in the javascript.

The JS wants to add an error message here:
$('#' + response.data[k].code)

But the "codes" returned by the server error do not correspond to the Elements in the UI, so nothing happens with these error messages

@meitar

This comment has been minimized.

Member

meitar commented Dec 10, 2016

Is this related to the current released codebase or does this refer to #199?

@mcverter

This comment has been minimized.

Contributor

mcverter commented Dec 10, 2016

It is broken in the current code base. This was code I did not alter.

@mcverter

This comment has been minimized.

Contributor

mcverter commented Dec 10, 2016

It rests on an assumption that the PHP will return a response.data JSON object that has information about the jQuery IDs of the front end divs. So these values need to be synchronized somehow.

@meitar

This comment has been minimized.

Member

meitar commented Dec 13, 2016

I think this was fixed here. Feel free to reopen if not.

@meitar meitar closed this Dec 13, 2016

@mcverter

This comment has been minimized.

Contributor

mcverter commented Dec 13, 2016

Let me know what branch or commit I can pull to test whether this is fixed. It was not working in whatever codebase I was using. Thanks

@meitar

This comment has been minimized.

Member

meitar commented Dec 13, 2016

@mcverter It'll be in Buoy's develop branch, so you probably wanna just update your develop branch to match. If you already have a clone of the Better Angels Buoy repository:

git checkout develop
git pull https://github.com/betterangels/buoy.git develop

It would be useful for you to make sure your local develop branch is tracking the canonical develop branch, anyway. :) By that I mean:

$ git branch # which branch am I on?
* develop
  gh-pages
  master
  new-user-templates
$ git status # show me the status of this branch, notice the "up-to-date with" message in the output
On branch develop
Your branch is up-to-date with 'betterangels/develop'.
nothing to commit, working directory clean
$ git remote show betterangels # what is "betterangels?" It's pointing to the Better Angels repo on GitHub
* remote betterangels
  Fetch URL: git@github.com:betterangels/buoy.git
  Push  URL: git@github.com:betterangels/buoy.git
  HEAD branch: develop
  Remote branches:
    develop  tracked
    gh-pages tracked
    master   tracked
  Local branches configured for 'git pull':
    develop  merges with remote develop
    gh-pages merges with remote gh-pages
  Local refs configured for 'git push':
    develop  pushes to develop  (up to date)
    gh-pages pushes to gh-pages (up to date)
    master   pushes to master   (up to date)

Notice the "Local refs configured for…" stanzas in the output here. That tells me which local branches I'm associating the remote branches with. They have the same names (i.e., my develop branch is tracking the betterangels/develop branch) so it's less confusing for me, but you can name them whatever you want.

Here's what the git config looks like so you know how to set this up yourself if you want to:

$ git config --get-regexp betterangels
remote.betterangels.url git@github.com:betterangels/buoy.git
remote.betterangels.fetch +refs/heads/*:refs/remotes/betterangels/*
$ git config --get-regexp branch.develop
branch.develop.remote betterangels
branch.develop.merge refs/heads/develop

Thanks!

@mcverter

This comment has been minimized.

Contributor

mcverter commented Dec 13, 2016

Looks great. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment