Skip to content

Expense "from_archived_workspaces" filter does not work #8

@einzige

Description

@einzige

@cantino other filters work perfectly. This one fails (always returns same results):

2.0.0-p247 :010 > Mavenlink::Expense.scoped.filter(from_archived_workspaces: true).all
I, [2014-04-01T22:14:58.019563 #99449]  INFO -- : [Maven] Started GET /expenses with {"from_archived_workspaces"=>true}
I, [2014-04-01T22:15:06.944734 #99449]  INFO -- : [Maven] Received response:
I, [2014-04-01T22:15:06.946114 #99449]  INFO -- : {
     "count" => 2,
  "expenses" => {
    "21316325" => {
         "amount_in_cents" => 123,
                "category" => "Travel",
              "created_at" => "2014-04-01T00:40:33-07:00",
                "currency" => "USD",
      "currency_base_unit" => 100,
         "currency_symbol" => "$",
                    "date" => "2013-02-19",
                      "id" => "21316325",
             "is_billable" => false,
             "is_invoiced" => false,
                   "notes" => nil,
              "updated_at" => "2014-04-01T00:40:33-07:00",
           "user_can_edit" => true,
                 "user_id" => "4576975",
            "workspace_id" => "4894095"
    },
    "21336035" => {
         "amount_in_cents" => 1,
                "category" => "Travel",
              "created_at" => "2014-04-01T07:13:16-07:00",
                "currency" => "USD",
      "currency_base_unit" => 100,
         "currency_symbol" => "$",
                    "date" => "2015-01-01",
                      "id" => "21336035",
             "is_billable" => false,
             "is_invoiced" => false,
                   "notes" => nil,
              "updated_at" => "2014-04-01T07:13:16-07:00",
           "user_can_edit" => true,
                 "user_id" => "4576975",
            "workspace_id" => "4894095"
    }
  },
   "results" => [
    [0] {
       "id" => "21336035",
      "key" => "expenses"
    },
    [1] {
       "id" => "21316325",
      "key" => "expenses"
    }
  ]
}
[
  [0] {
       "amount_in_cents" => 1,
              "category" => "Travel",
            "created_at" => "2014-04-01T07:13:16-07:00",
              "currency" => "USD",
    "currency_base_unit" => 100,
       "currency_symbol" => "$",
                  "date" => "2015-01-01",
                    "id" => "21336035",
           "is_billable" => false,
           "is_invoiced" => false,
                 "notes" => nil,
            "updated_at" => "2014-04-01T07:13:16-07:00",
         "user_can_edit" => true,
               "user_id" => "4576975",
          "workspace_id" => "4894095"
  },
  [1] {
       "amount_in_cents" => 123,
              "category" => "Travel",
            "created_at" => "2014-04-01T00:40:33-07:00",
              "currency" => "USD",
    "currency_base_unit" => 100,
       "currency_symbol" => "$",
                  "date" => "2013-02-19",
                    "id" => "21316325",
           "is_billable" => false,
           "is_invoiced" => false,
                 "notes" => nil,
            "updated_at" => "2014-04-01T00:40:33-07:00",
         "user_can_edit" => true,
               "user_id" => "4576975",
          "workspace_id" => "4894095"
  }
]
2.0.0-p247 :011 > Mavenlink::Expense.scoped.filter(from_archived_workspaces: false).all
I, [2014-04-01T22:15:15.709791 #99449]  INFO -- : [Maven] Started GET /expenses with {"from_archived_workspaces"=>false}
I, [2014-04-01T22:15:16.904365 #99449]  INFO -- : [Maven] Received response:
I, [2014-04-01T22:15:16.906461 #99449]  INFO -- : {
     "count" => 2,
  "expenses" => {
    "21316325" => {
         "amount_in_cents" => 123,
                "category" => "Travel",
              "created_at" => "2014-04-01T00:40:33-07:00",
                "currency" => "USD",
      "currency_base_unit" => 100,
         "currency_symbol" => "$",
                    "date" => "2013-02-19",
                      "id" => "21316325",
             "is_billable" => false,
             "is_invoiced" => false,
                   "notes" => nil,
              "updated_at" => "2014-04-01T00:40:33-07:00",
           "user_can_edit" => true,
                 "user_id" => "4576975",
            "workspace_id" => "4894095"
    },
    "21336035" => {
         "amount_in_cents" => 1,
                "category" => "Travel",
              "created_at" => "2014-04-01T07:13:16-07:00",
                "currency" => "USD",
      "currency_base_unit" => 100,
         "currency_symbol" => "$",
                    "date" => "2015-01-01",
                      "id" => "21336035",
             "is_billable" => false,
             "is_invoiced" => false,
                   "notes" => nil,
              "updated_at" => "2014-04-01T07:13:16-07:00",
           "user_can_edit" => true,
                 "user_id" => "4576975",
            "workspace_id" => "4894095"
    }
  },
   "results" => [
    [0] {
       "id" => "21336035",
      "key" => "expenses"
    },
    [1] {
       "id" => "21316325",
      "key" => "expenses"
    }
  ]
}
[
  [0] {
       "amount_in_cents" => 1,
              "category" => "Travel",
            "created_at" => "2014-04-01T07:13:16-07:00",
              "currency" => "USD",
    "currency_base_unit" => 100,
       "currency_symbol" => "$",
                  "date" => "2015-01-01",
                    "id" => "21336035",
           "is_billable" => false,
           "is_invoiced" => false,
                 "notes" => nil,
            "updated_at" => "2014-04-01T07:13:16-07:00",
         "user_can_edit" => true,
               "user_id" => "4576975",
          "workspace_id" => "4894095"
  },
  [1] {
       "amount_in_cents" => 123,
              "category" => "Travel",
            "created_at" => "2014-04-01T00:40:33-07:00",
              "currency" => "USD",
    "currency_base_unit" => 100,
       "currency_symbol" => "$",
                  "date" => "2013-02-19",
                    "id" => "21316325",
           "is_billable" => false,
           "is_invoiced" => false,
                 "notes" => nil,
            "updated_at" => "2014-04-01T00:40:33-07:00",
         "user_can_edit" => true,
               "user_id" => "4576975",
          "workspace_id" => "4894095"
  }
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions