ubjs issueshttps://git-pub.intecracy.com/unitybase/ubjs/-/issues2019-01-27T18:40:23+02:00https://git-pub.intecracy.com/unitybase/ubjs/-/issues/43AdminUI: ShowList - to allow columns without "name"2019-01-27T18:40:23+02:00Andrii BezuglyiAdminUI: ShowList - to allow columns without "name"Sometimes, I need calculated columns on client.
But ShowList requires "name", which it puts to the query to DB.
Please don't require it. I need columns, which would not cause extra column to be queries from DB.
A trick with specifying ...Sometimes, I need calculated columns on client.
But ShowList requires "name", which it puts to the query to DB.
Please don't require it. I need columns, which would not cause extra column to be queries from DB.
A trick with specifying "ID" works only if I have just one such column. If I have more - I need more "fake" attributes.
Please just allow columns with "format", but without "name".Nectain 01Pavel MashliakovskiyPavel Mashliakovskiyhttps://git-pub.intecracy.com/unitybase/ubjs/-/issues/40ORG: Add "organizationID" to "org_department"2019-01-28T12:27:22+02:00Andrii BezuglyiORG: Add "organizationID" to "org_department"There are lots of cases, when it is required to output in grid organization of departments or organization staff units.
Please consider adding `org_department.organizationID` - it would help a lot.There are lots of cases, when it is required to output in grid organization of departments or organization staff units.
Please consider adding `org_department.organizationID` - it would help a lot.Nectain 01Pavel MashliakovskiyPavel Mashliakovskiyhttps://git-pub.intecracy.com/unitybase/ubjs/-/issues/39AdminUI: ShowList - to allow display queries without ID column2019-01-28T15:15:12+02:00Andrii BezuglyiAdminUI: ShowList - to allow display queries without ID columnI have entities mapped to views.
Any chance to allow queries which do NOT contain ID column? It is a bit of a pain to add some meaningless, unique value as ID for such entities - just to be able to "showList" them.I have entities mapped to views.
Any chance to allow queries which do NOT contain ID column? It is a bit of a pain to add some meaningless, unique value as ID for such entities - just to be able to "showList" them.Nectain 01Pavel MashliakovskiyPavel Mashliakovskiyhttps://git-pub.intecracy.com/unitybase/ubjs/-/issues/36AdminUI - grid - export to Excel / CSV / HTML - provide cell and row to forma...2019-03-12T16:13:42+02:00Andrii BezuglyiAdminUI - grid - export to Excel / CSV / HTML - provide cell and row to format functionsWhen a cell in grid has a custom format function, it accepts 3 parameters:
- value
- cell
- row
But when you export the very same grid to excel / html / csv - you have only the "value" parameter.
I found my peace with undefined cell and...When a cell in grid has a custom format function, it accepts 3 parameters:
- value
- cell
- row
But when you export the very same grid to excel / html / csv - you have only the "value" parameter.
I found my peace with undefined cell and just check its type - if it is object or not. Though that is not too comfortable :)
But I really do need row - I need to be able to look at other columns values. Otherwise, all I could do - return empty cells for columns, which builds their value client-side from other column's values.Nectain 01Pavel MashliakovskiyPavel Mashliakovskiyhttps://git-pub.intecracy.com/unitybase/ubjs/-/issues/18TimeZome conversion issue with "Date" attributes2019-01-24T19:42:58+02:00Andrii BezuglyiTimeZome conversion issue with "Date" attributesSTR:
* Have an entity with `Date` attribute.
* For example (a real example):
```json
{
"name": "deliveryDate",
"caption": "Delivery Date",
"dataType": "Date",
"allowNull": false
}
```
* Client-si...STR:
* Have an entity with `Date` attribute.
* For example (a real example):
```json
{
"name": "deliveryDate",
"caption": "Delivery Date",
"dataType": "Date",
"allowNull": false
}
```
* Client-side: generate a value for the attribute. Many UI controls (most) generate begin of the date in local TZ of the browser.
* That would be a value like `Tue Nov 13 2018 00:00:00 GMT+0200 (Eastern European Standard Time)`:
* Save (insert or update) an instance of the entity with the value.
* Request would looke like:
```json
{
"entity": "pln_ProjectSkuCategory",
"method": "update",
"execParams": {
"ID": 3000000062661,
"mi_modifyDate": "2018-11-05T14:53:44.000Z",
"deliveryDate": "2018-11-12T22:00:00.000Z"
}
}
```
* Note - no handling in `UB.connection` happened, no TZ shifting, nothing. Date value goes to JSON "as is" and in UTC it is not a start of a day anymore.
* In DB you would have:
```
| ID | deliveryDate |
| 3000000062661 | 2018-11-12 22:00:00.000 |
```
* And when you query that value from the server, you'd get (`resultData.data[0]`):
```json
[
3000000062661,
"2018-11-12T22:00:00Z"
]
```
* This value returned by `selectAsArray`:
![image](/uploads/d96a3fccf3eacdcc3f0c8698914e9c89/image.png)
* NOTE: now the value is all wrong.
EXPECTED:
* The best would be to `UB.connection.query` to patch date values, so that DB would store them as start of the day in UTC.
* Though "fixing" `selectAsArray` (to not change value) may look like a fix, it would be not: users with local TZ differ from the user saved the value would see different result, which is highly undesiraeble.
WORKAROUND APPLIED:
* We manually patch value before sending to server as the following:
```javascript
const deliverDateConverted = new Date((deliveryDate.getTime() / 60000 - deliveryDate.getTimezoneOffset())*60000)
```
Nectain 01Pavel MashliakovskiyPavel Mashliakovskiy