Skip to content
This repository has been archived by the owner on Nov 29, 2017. It is now read-only.

More flexible way of querying against ServiceNow #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dmfranko
Copy link

I was messing around with something and using the service_now gem. I found that the where method didn't allow me to use a BETWEEN operator for dates. The “old” way basically forced you to use a specific operator. This will allow for the user to specify what operator should be used. This would break existing code if someone is using the where method, so if you want to accept this request and/or want me to make it backwards compatible.

The “old” way basically forced you to use a specific operator.  This
will allow for the user to specify what operator should be used.
@caseywatts
Copy link
Contributor

I think this looks great, much cleaner too!
We'll justneed to test this in three places before merging it in:

  • wifi_reporter_manager
  • ServiceNowAPIWebform
  • the script Micah is working on

@caseywatts caseywatts mentioned this pull request Dec 2, 2014
@caseywatts
Copy link
Contributor

Micah worked on something similar in #6

@mrosales
Copy link

mrosales commented Dec 4, 2014

This way is definitely more powerful. Queries can also be joined with OR here as well if it is manually prefixed onto a the :field component of the query hash.

I am not sure how to make OR cleaner with this method. Let me know if you have any ideas.

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

Successfully merging this pull request may close these issues.

None yet

3 participants