Skip to content
This repository has been archived by the owner on Feb 2, 2022. It is now read-only.

Fix error messaging for schedule alert #201

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

Fix error messaging for schedule alert #201

mcverter opened this issue Dec 10, 2016 · 7 comments

Comments

@mcverter
Copy link
Contributor

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

@fabacab
Copy link
Contributor

fabacab commented Dec 10, 2016

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

@mcverter
Copy link
Contributor Author

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

@mcverter
Copy link
Contributor Author

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.

@fabacab
Copy link
Contributor

fabacab commented Dec 13, 2016

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

@fabacab fabacab closed this as completed Dec 13, 2016
@mcverter
Copy link
Contributor Author

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

@fabacab
Copy link
Contributor

fabacab 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
Copy link
Contributor Author

Looks great. Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants