ubjs issueshttps://git-pub.intecracy.com/unitybase/ubjs/-/issues2021-04-02T15:20:14+03:00https://git-pub.intecracy.com/unitybase/ubjs/-/issues/116DDL generation - mi_*date atribute default not checked2021-04-02T15:20:14+03:00Pavel MashliakovskiyDDL generation - mi_*date atribute default not checkedAt last for Oracle in case mi_*date default check is not in DB DDL generator do non adds itAt last for Oracle in case mi_*date default check is not in DB DDL generator do non adds itPavel MashliakovskiyPavel Mashliakovskiyhttps://git-pub.intecracy.com/unitybase/ubjs/-/issues/85Cannot delete shortcut2019-10-15T12:16:42+03:00Andrii BezuglyiCannot delete shortcut```
20191014 20401044 " http 127.0.0.1 -> POST ubql
20191014 20401044 " info [{"entity":"ubm_navshortcut","execParams":{"ID":3000000022902},"method":"delete"}]
20191014 20401044 " call endpoint ubql
20191014 20401044 " auth a...```
20191014 20401044 " http 127.0.0.1 -> POST ubql
20191014 20401044 " info [{"entity":"ubm_navshortcut","execParams":{"ID":3000000022902},"method":"delete"}]
20191014 20401044 " call endpoint ubql
20191014 20401044 " auth admin/389584226
20191014 20401044 " + method(TubTreeMixin) ubm_navshortcut.beforedelete
20191014 20401044 " EXC EMetabaseException {"errorCode":26,"Message":"Parameter \"ID\" is required for method \"delete\""} [] at 010004657a
20191014 20401044 " - 00.000.353
20191014 20401044 " ERROR POST ubql ERROR=500 (Parameter "ID" is required for method "delete")
20191014 20401044 " http 127.0.0.1 <- 500
20191014 20401044 " - 00.002.249
```Pavel MashliakovskiyPavel Mashliakovskiyhttps://git-pub.intecracy.com/unitybase/ubjs/-/issues/70adminui_vue: edited shortcut not updated without refreshing page2019-10-11T16:12:19+03:00Andrii Bezuglyiadminui_vue: edited shortcut not updated without refreshing page**STR**:
- edit a shortcut
- save changes
- click on shortcut
**AR**:
- the shortcut work as it was BEFORE updating, no changes applied
- but if you refresh page, changes applied
**ER**:
- changes MUST be applied instantly after saving...**STR**:
- edit a shortcut
- save changes
- click on shortcut
**AR**:
- the shortcut work as it was BEFORE updating, no changes applied
- but if you refresh page, changes applied
**ER**:
- changes MUST be applied instantly after saving, so that:
- edit a shortcut
- save changes
- click shortcut (not page refresh)
- see *updated* shortcut in actionDmitriy RudnikDmitriy Rudnikhttps://git-pub.intecracy.com/unitybase/ubjs/-/issues/66softLock error in ubm_navshortcut2019-07-31T18:34:04+03:00Dmitriy RudniksoftLock error in ubm_navshortcut![image](/uploads/d3a2337be64f7badba7a203937f88a29/image.png)
STR:
- try to edit any shortcut![image](/uploads/d3a2337be64f7badba7a203937f88a29/image.png)
STR:
- try to edit any shortcutPavel MashliakovskiyPavel Mashliakovskiyhttps://git-pub.intecracy.com/unitybase/ubjs/-/issues/60Отсутствует возможность привязать учетку пользователя Системы к сотруднику ор...2019-06-10T11:24:08+03:00Жукова ВикторияОтсутствует возможность привязать учетку пользователя Системы к сотруднику организации.При создании сотрудника организации на карточке сотрудника (рабочий стол "Ресурсы"/"Предоставление ресурсов") отсутствует поле (либо другая возможность) для привязки текущего сотрудника к пользователю (логину).
Enviroment: http://ast.doc...При создании сотрудника организации на карточке сотрудника (рабочий стол "Ресурсы"/"Предоставление ресурсов") отсутствует поле (либо другая возможность) для привязки текущего сотрудника к пользователю (логину).
Enviroment: http://ast.docflow.bpm.unitybase.info/
admin - adminСеднева ОльгаСеднева Ольгаhttps://git-pub.intecracy.com/unitybase/ubjs/-/issues/52При закрытии закладки формы, пока на форме крутится "Loading...", нужно запре...2019-06-12T14:16:38+03:00Zimina ValentynaПри закрытии закладки формы, пока на форме крутится "Loading...", нужно запретить закрывать закладку.https://tstora.docflow2.unitybase.info/
tester1 (пароль 1111)
1. Создать проект внутреннего документа, заполнить обяз. поля, сохранить.
2. на вкл.Исполнение добавить пункт, заполнить форму пункта добавить через контрол исполнителя.
3. по...https://tstora.docflow2.unitybase.info/
tester1 (пароль 1111)
1. Создать проект внутреннего документа, заполнить обяз. поля, сохранить.
2. на вкл.Исполнение добавить пункт, заполнить форму пункта добавить через контрол исполнителя.
3. пока крутиться "Loading..." закрыть вкладку с документом
Вкладка закрывается и выдается ошибка:
Виникла невідома помилка. Зверніться, будь ласка, до адміністратора системи.file: "" line: TypeError: Cannot read property 'mask' of undefined
at e.mask (/models/adminui-pub/dist/ext-all.min.js:1:318367)
at e.setRecord (/clientRequire/@docflow/doc/public/dist/doc.app.min.js:1:53833)
at e.newRecord (/clientRequire/@docflow/doc/public/dist/doc.app.min.js:1:53729)
at eval (/clientRequire/@docflow/doc/public/dist/doc.app.min.js:1:53280)
at r (/clientRequire/@unitybase/adminui-pub/dist/adminui.app.min.js:1:9999)
at o._settlePromiseFromHandler (/clientRequire/@unitybase/adminui-pub/dist/adminui.app.min.js:1:413188)
at o._settlePromise (/clientRequire/@unitybase/adminui-pub/dist/adminui.app.min.js:1:413988)
at o._settlePromise0 (/clientRequire/@unitybase/adminui-pub/dist/adminui.app.min.js:1:414687)
at o._settlePromises (/clientRequire/@unitybase/adminui-pub/dist/adminui.app.min.js:1:416039)
at l (/clientRequire/@unitybase/adminui-pub/dist/adminui.app.min.js:1:417592)
at s (/clientRequire/@unitybase/adminui-pub/dist/adminui.app.min.js:1:417531)
at i._drainQueues (/clientRequire/@unitybase/adminui-pub/dist/adminui.app.min.js:1:419099)
at drainQueues (/clientRequire/@unitybase/adminui-pub/dist/adminui.app.min.js:1:417273)
-------------------
Необходимо запретить закрывать вкладку на форме пока форма не догружена.Pavel MashliakovskiyPavel Mashliakovskiyhttps://git-pub.intecracy.com/unitybase/ubjs/-/issues/51требуется локализация заголовков вкладок на форме пользователя2019-07-09T13:01:27+03:00Zimina Valentynaтребуется локализация заголовков вкладок на форме пользователясправочник uba_user,
см. вложениесправочник uba_user,
см. вложениеPavel MashliakovskiyPavel Mashliakovskiyhttps://git-pub.intecracy.com/unitybase/ubjs/-/issues/44DocNet. При первом входе в Систему по домену запрашиваются авторизационные да...2019-02-06T16:17:34+02:00Жукова ВикторияDocNet. При первом входе в Систему по домену запрашиваются авторизационные данные пользователя.1. Пользователь на форме входа в Документооборот выбирает доменный вход.
2. Нажимает кнопку "Продолжить".
Результат: Открывается дополнительное окно для указания имени пользователя и пароля. ![Domain_enter](/uploads/6663a105ec2ec7dcc346...1. Пользователь на форме входа в Документооборот выбирает доменный вход.
2. Нажимает кнопку "Продолжить".
Результат: Открывается дополнительное окно для указания имени пользователя и пароля. ![Domain_enter](/uploads/6663a105ec2ec7dcc34627e415893294/Domain_enter.PNG)
Ожидаемый результат: Никаких дополнительный форм для указания параметров входа быть не должно.Pavel MashliakovskiyPavel Mashliakovskiyhttps://git-pub.intecracy.com/unitybase/ubjs/-/issues/41UB form does not allow float attributes to have value >10^72019-01-29T14:45:14+02:00Andrii BezuglyiUB form does not allow float attributes to have value >10^7There is an attribute:
```json
{
"name": "budgetPPU",
"caption": "Budget Price Per Unit",
"dataType": "Float",
"allowNull": false
},
```
UB form does not allow it to have value 10'000'000 or more.
It should.
Underlying DB colum...There is an attribute:
```json
{
"name": "budgetPPU",
"caption": "Budget Price Per Unit",
"dataType": "Float",
"allowNull": false
},
```
UB form does not allow it to have value 10'000'000 or more.
It should.
Underlying DB column has no problem with the following:
```sql
update mdm_SkuItem set budgetPPU = 1000000000000.000001 where id = 3000000027449
```
It maintains all the precision an signs.
I did a workaround - I have no idea if it fully correct, but it pushes limit far enough to hit string length limit :) :
```javascript
validator: function (val) {
let minValue = -8999000000000000
let maxValue = 8999000000000000
if (Number(val.replace(/[^0-9]/, '').replace(',', '.')) < maxValue &&
Number(val.replace(/[^0-9]/, '').replace(',', '.')) > minValue
) {
let rv = val.replace('-', '').match(/[0-9]*[^0-9]{1}([0-9]+)/)
if ((rv && rv.length > 1 && rv[1].length <= this.decimalPrecision) || !rv || rv.length === 1) {
return true
}
}
return UB.i18n('numberOfSignificantDigits')
}
},
```
But I would really appreciate if you put your eye here: https://git-pub.intecracy.com/unitybase/ubjs/blob/master/packages/adminui-pub/_src/app/core/UBUtil.js#L549
and make sure it works as needed.
Thx!Nectain 01Pavel MashliakovskiyPavel Mashliakovskiyhttps://git-pub.intecracy.com/unitybase/ubjs/-/issues/34DocFlow_предоставление возможности локализации описаний системных ролей2019-07-10T10:58:20+03:00Zimina ValentynaDocFlow_предоставление возможности локализации описаний системных ролей1) https://tstora.docflow2.unitybase.info
под admin (rsm2)
2) Администрирование \ Безопасность \ Системные роли
3) открыть любую запись
На форме системной роли поле "Описание" сделать мультиязычным.
Сейчас поле не мультиязычное, см.вложе...1) https://tstora.docflow2.unitybase.info
под admin (rsm2)
2) Администрирование \ Безопасность \ Системные роли
3) открыть любую запись
На форме системной роли поле "Описание" сделать мультиязычным.
Сейчас поле не мультиязычное, см.вложение![ub_1](/uploads/af148ac82a7cbefd522c2b498fa0ec09/ub_1.jpg)Pavel MashliakovskiyPavel Mashliakovskiyhttps://git-pub.intecracy.com/unitybase/ubjs/-/issues/26CRITICAL: RLS and ELS: User does NOT get roles via Groups2018-12-14T11:55:58+02:00Andrii BezuglyiCRITICAL: RLS and ELS: User does NOT get roles via GroupsThe following problems with roles via groups feature:
* `Session.uData` attributes does not contain roles obtained via groups, neither `roles`, nor `roleIDs`, that is why RLS does not work.
* ELS is not obtained via roles assigned to use...The following problems with roles via groups feature:
* `Session.uData` attributes does not contain roles obtained via groups, neither `roles`, nor `roleIDs`, that is why RLS does not work.
* ELS is not obtained via roles assigned to user groups.Pavel MashliakovskiyPavel Mashliakovskiyhttps://git-pub.intecracy.com/unitybase/ubjs/-/issues/23DDL generator - invalid statement for updating estimate default for ENUM2018-11-28T11:57:46+02:00Pavel MashliakovskiyDDL generator - invalid statement for updating estimate default for ENUMIn case `allowNull` is changed to `false` for attribute of type "Enum" PostgreSQL DDL generator generate unnecessary quotes for enum group
```
update cnt_Contract set status = (select min(code) from ubm_enum where egroup = ''CNT_CON_STAT...In case `allowNull` is changed to `false` for attribute of type "Enum" PostgreSQL DDL generator generate unnecessary quotes for enum group
```
update cnt_Contract set status = (select min(code) from ubm_enum where egroup = ''CNT_CON_STATUS'') where status is null;
```
should be
```
update cnt_Contract set status = (select min(code) from ubm_enum where egroup = 'CNT_CON_STATUS') where status is null;
```
Also should be verified for other RDBMSPavel 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 Mashliakovskiyhttps://git-pub.intecracy.com/unitybase/ubjs/-/issues/12BUG: SQL Server - ubcli does not specify default schema for database user on ...2018-09-07T19:21:04+03:00Andrii BezuglyiBUG: SQL Server - ubcli does not specify default schema for database user on DB creationWhen create a new DB using `ubcli initDB -create` command, the created user for
SQL Server database does not have correct default schema.
It MUST be "dbo".
Use the following pattern:
```sql
CREATE USER [my_app_user] FOR LOGIN [my_app_u...When create a new DB using `ubcli initDB -create` command, the created user for
SQL Server database does not have correct default schema.
It MUST be "dbo".
Use the following pattern:
```sql
CREATE USER [my_app_user] FOR LOGIN [my_app_user] WITH DEFAULT_SCHEMA=[dbo]
```Pavel MashliakovskiyPavel Mashliakovskiyhttps://git-pub.intecracy.com/unitybase/ubjs/-/issues/10Specifying "browser" in package.json (as UB advices in warning messages by s...2018-09-06T18:28:59+03:00Andrii BezuglyiSpecifying "browser" in package.json (as UB advices in warning messages by server) lead to crashThe package.json of model:
```json
{
"config": {
"ubmodel": {
"name": "mdm"
}
},
"browser": "./public/initModel.js",
"private": true
}
```
The crash:
```
20180802 22352935 " ERROR assertPath@path.js:13:11 join@p...The package.json of model:
```json
{
"config": {
"ubmodel": {
"name": "mdm"
}
},
"browser": "./public/initModel.js",
"private": true
}
```
The crash:
```
20180802 22352935 " ERROR assertPath@path.js:13:11 join@path.js:474:7 getServerConfiguration/<@C:\projects-nectain\ub-app\node_modules\@unitybase\base\argv.js:323:44 getServerConfiguration@C:\projects-nectain\ub-app\node_modules\@unitybase\base\argv.js:301:3 @C:\projects-nectain\ub-app\node_modules\@unitybase\ub\modules\App.js:221:22 Module.prototype._compile@module.js:641:14 Module._extensions[".js"]@module.js:652:3 Module.prototype.load@module.js:560:3 tryModuleLoad@module.js:503:5 Module._load@module.js:495:3 Module.prototype.require@module.js:585:10 require@internal/module.js:11:14 @C:\projects-nectain\ub-app\node_modules\@unitybase\ub\modelUB.js:5:13 Module.prototype._compile@module.js:641:14 Module._extensions[".js"]@module.js:652:3 Module.prototype.load@module.js:560:3 tryModuleLoad@module.js:503:5 Module._load@module.js:495:3 Module.prototype.require@module.js:585:10 require@internal/module.js:11:14 @C:\projects-nectain\ub-app\index.js:1:74 Module.prototype._compile@module.js:641:14 Module._extensions[".js"]@module.js:652:3 Module.prototype.load@module.js:560:3 tryModuleLoad@module.js:503:5 Module._load@module.js:495:3 Module.prototype.require@module.js:585:10 @UB.js:42:3
20180802 22352935 " EXC C:\\projects-nectain\\ub-app\\node_modules\\@unitybase\\ub\\modules\\App.js:240\n\nError: App.serverConfig is undefined\n@C:\\projects-nectain\\ub-app\\node_modules\\@unitybase\\ub\\modules\\App.js:240:1\n@C:\\projects-nectain\\ub-app\\node_modules\\@unitybase\\ub\\modelUB.js:5:13\n@C:\\projects-nectain\\ub-app\\index.js:1:74\n@UB.js:42:3\n
20180802 22352935 " ERROR GET init ERROR=500 (App.serverConfig is undefined)
```
Adding/removing "browser" attribute to/from package.json makes UB work or not.Pavel MashliakovskiyPavel Mashliakovskiyhttps://git-pub.intecracy.com/unitybase/ubjs/-/issues/8DDL SQLite3 "Error: this.DDL.dropColumn.push is not a function"2018-07-27T21:59:20+03:00Andrii BezuglyiDDL SQLite3 "Error: this.DDL.dropColumn.push is not a function"Sometimes I am getting this error on SQLite3.
Do not really know why.Sometimes I am getting this error on SQLite3.
Do not really know why.Pavel MashliakovskiyPavel Mashliakovskiyhttps://git-pub.intecracy.com/unitybase/ubjs/-/issues/7DDL error "Error: Abstract genCodeDropPK"2018-07-25T17:44:28+03:00Andrii BezuglyiDDL error "Error: Abstract genCodeDropPK"I cannot say for sure why, but sometimes I am getting the `Error: Abstract genCodeDropPK` error.I cannot say for sure why, but sometimes I am getting the `Error: Abstract genCodeDropPK` error.Pavel MashliakovskiyPavel Mashliakovskiyhttps://git-pub.intecracy.com/unitybase/ubjs/-/issues/6BasePanel.js - ALS screws up attributes!2018-07-21T18:03:16+03:00Andrii BezuglyiBasePanel.js - ALS screws up attributes!I do NOT use ALS, but nevertheless, {{BasePanel.updateAls}} forces the attribute control "allowBlank" value to whatever this method "thinks" right.
For example, I deliberately set `allowBlank: true` - I do not way the asterisk to show f...I do NOT use ALS, but nevertheless, {{BasePanel.updateAls}} forces the attribute control "allowBlank" value to whatever this method "thinks" right.
For example, I deliberately set `allowBlank: true` - I do not way the asterisk to show for a field, because I made field readonly on form and calculate attribute value inside the form. I just do not want to show the asterisk, so I set:
```javascript
{attributeName: 'total', readOnly: true, allowBlank: true}
```
But that `BasePanel.updateAls` screws it up and in 2172 line of BasePanel.js executes:
```javascript
if (allowBlank !== field.allowBlank) {
field.setAllowBlank(allowBlank)
}
```
I have no experience with ALS mixin, so it is not trivial for me to suggest fix, but man, I do not even use ALS, why this method tamper with my form attributes?Pavel MashliakovskiyPavel Mashliakovskiyhttps://git-pub.intecracy.com/unitybase/ubjs/-/issues/5DDL generation fails to drop and re-create index of columns2018-07-21T19:21:27+03:00Andrii BezuglyiDDL generation fails to drop and re-create index of columns**STR**:
Have an entity with index on a column:
```json
{
"connectionName": "",
"sqlAlias": "plnPrjII",
"caption": "Sourcing Project Item Intervals",
"descriptionAttribute": "interval",
"mixins": {
"mStorage": {
"...**STR**:
Have an entity with index on a column:
```json
{
"connectionName": "",
"sqlAlias": "plnPrjII",
"caption": "Sourcing Project Item Intervals",
"descriptionAttribute": "interval",
"mixins": {
"mStorage": {
"simpleAudit": true,
"safeDelete": false
}
},
"attributes": [
{
"name": "projectItemID",
"caption": "Sourcing Project Item",
"dataType": "Entity", "associatedEntity": "pln_ProjectItem",
"cascadeDelete": true
},
{
"name": "interval",
"caption": "Interval",
"dataType": "Date"
},
{
"name": "quantity",
"caption": "Quantity",
"dataType": "Float",
"defaultValue": "(0)"
}
],
"dbExtensions": {
"idx_pln_ProjectItemInterval_uniq": {
"type": "INDEX",
"definition": {
"keys": {
"projectItemID": {},
"interval": {}
},
"isUnique": true
}
}
}
}
```
Now, change type of `interval` column from Date, to, let's say "Int" and generate DDL.
It will fail, because the index does not get dropped and created with the operation.
I tried it on MS SQL.Pavel MashliakovskiyPavel Mashliakovskiyhttps://git-pub.intecracy.com/unitybase/ubjs/-/issues/3Cannot install UnityBase "silently" even if VC++ Redistributable already inst...2018-09-08T13:50:09+03:00Утеченко ВикторCannot install UnityBase "silently" even if VC++ Redistributable already installed**Preconditions**
Machine without VC++ Redistributable and UnityBase
**Steps to reproduce**
1) Download and install VC++ Redistributable required by UnityBase (x86 redist ver. 14.0.24215 was used, from following [link](https://down...**Preconditions**
Machine without VC++ Redistributable and UnityBase
**Steps to reproduce**
1) Download and install VC++ Redistributable required by UnityBase (x86 redist ver. 14.0.24215 was used, from following [link](https://download.microsoft.com/download/6/A/A/6AA4EDFF-645B-48C5-81CC-ED5963AEAD48/vc_redist.x86.exe) )
2) Download OpenUBv4.exe installer ([this one](https://unitybase.info/media/files/OpenUBv4.exe) was used)
3) Run UB installer from command line with administrator privileges using parameters for silent installatoin, e.g.:
> C:\Downloads\OpenUBv4.exe /DIR="c:\UnityBase" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART
**Actual result**:
VC++ Redistributable installer window appear, it requires user's actions - despite exact the same version of VC++ Redistributable is already installed in system
**Expected result**:
no additional user's actions required, UnityBase successfully installedPavel MashliakovskiyPavel Mashliakovskiy