| Time |
Nick |
Message |
| 03:05 |
|
collum joined #evergreen |
| 05:08 |
|
collum joined #evergreen |
| 08:10 |
|
collum joined #evergreen |
| 08:42 |
|
mantis joined #evergreen |
| 08:49 |
|
mmorgan joined #evergreen |
| 09:05 |
|
smayo joined #evergreen |
| 09:10 |
|
smayo joined #evergreen |
| 10:13 |
|
collum joined #evergreen |
| 10:52 |
csharp_ |
Bmagic: you could probably cobble together something with actor.org_unit_descendants() with actor.org_unit_ancestor_setting() as a model? |
| 10:53 |
Bmagic |
I ended up with this: https://pastebin.com/ruPzAkWw |
| 10:53 |
Bmagic |
I feel* like there's a function hiding somewhere that does this for me |
| 11:02 |
berick |
Bmagic: not a db func but there's open-ils.actor.settings.value_for_all_orgs |
| 11:03 |
Bmagic |
ah, maybe that will do it, let's have a look |
| 11:03 |
berick |
goood: *nod* re: redisurf; planning to return soon |
| 11:03 |
Bmagic |
oh, right, not a DB func. Well, I need a DB func |
| 11:04 |
|
Christineb joined #evergreen |
| 11:07 |
goood |
Bmagic: if you can use json_query, just use a transform of actor.org_unit_descendents (and specify the transform output column, there's documentation on that) on the org column of the settings table. the result will expand to include the org and it's progeny |
| 11:07 |
Bmagic |
goood: would that be "better" than my current approach? |
| 11:07 |
goood |
I don't recall if you can use a select-clause transform in a search call ... I don't think so, though. |
| 11:08 |
goood |
Bmagic: better than a new function? I mean, it depends on how useful it is outside your exact case. we haven't needed it yet, so I'd like to hear more about the "why" |
| 11:09 |
Bmagic |
I'm not making a new function for this need, I'm integrating that chunk into a function for the dashboard |
| 11:09 |
goood |
and the paste suggests it's very specific and limited. only exactly one setting and must contain (but not actually BE?) the string 'true' |
| 11:11 |
goood |
anyway, you can do what you want today, but if "who has X" is something we generally need, sure. but remember to cover things like settings view permissions in your logic. those shouldn't be leaked if it can be avoided |
| 11:12 |
Bmagic |
'true' is what lands in the settings table when it's type 'bool' so I could make it more rigid and check for exactly = 'true'. I'll do that |
| 11:52 |
csharp_ |
@decide true or false or null |
| 11:52 |
pinesol |
csharp_: go with null |
| 11:53 |
csharp_ |
@decide [someone] or [someone] or [someone] |
| 11:53 |
pinesol |
go with degraafk |
| 11:55 |
berick |
@who is [someone] |
| 11:55 |
pinesol |
beardicus is jmurray-isl. |
| 12:01 |
|
smayo joined #evergreen |
| 13:16 |
|
collum joined #evergreen |
| 13:23 |
|
jihpringle joined #evergreen |
| 13:30 |
|
Lorne joined #evergreen |
| 15:18 |
|
collum joined #evergreen |
| 15:29 |
|
mantis left #evergreen |
| 17:02 |
|
jihpringle joined #evergreen |
| 17:12 |
|
mmorgan left #evergreen |
| 18:28 |
|
collum joined #evergreen |
| 19:08 |
|
jihpringle joined #evergreen |
| 21:51 |
|
collum joined #evergreen |
| 23:47 |
|
collum joined #evergreen |