complexqa_frontend_core 1.19.2 → 1.19.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "complexqa_frontend_core",
3
- "version": "1.19.2",
3
+ "version": "1.19.3",
4
4
  "description": "core of web ",
5
5
  "type": "module",
6
6
  "exports": {
@@ -1,5 +1,6 @@
1
1
  import { typeBugRelation } from '../../../types/family_relation/typeBugRelation.js';
2
2
  import { typeTestCase } from '../../../types/family_elements/typeTestCase.js';
3
+ import { typeBug } from '../../../types/family_elements/typeBug.js';
3
4
  import { UserService } from '../../../services/UserService.js';
4
5
  import { createColumn, createGoToColumn } from '../helpers/column_factory.js';
5
6
  import { createListingFor, registerSection } from '../helpers/section_registry.js';
@@ -42,7 +43,47 @@ function build_bug_relation_test_cases_columns(locale)
42
43
 
43
44
 
44
45
  /**
45
- * Секции `bug_relation`: `test_cases`.
46
+ * Колонки связанных багов на странице test_case/details.
47
+ * Поля совпадают с bug × listing, данные — через hydrate bug_id.
48
+ *
49
+ * @param {string} locale
50
+ * @returns {import('../../../types/family_service/typeTableColumn.js').typeTableColumn[]}
51
+ */
52
+ function build_bug_relation_bugs_columns(locale)
53
+ {
54
+ const relation_model = new typeBugRelation();
55
+ const bug_model = new typeBug();
56
+ const columns = [];
57
+
58
+ const bugColumn = (field, overrides = {}) => createColumn(relation_model, locale, `bug_id.${ field }`, {
59
+ header_field : field,
60
+ header_element_type : 'bug',
61
+ is_editable : false,
62
+ ...overrides,
63
+ });
64
+
65
+ columns.push(bugColumn('bug_id', { width: '60', default_sort: 'desc' }));
66
+ columns.push(bugColumn('bug_title', {
67
+ width : '420',
68
+ is_required : true,
69
+ is_title : true,
70
+ }));
71
+ columns.push(bugColumn('bug_status', { width: '150', is_required: true }));
72
+ columns.push(bugColumn('bug_priority', { width: '130', is_required: true }));
73
+ columns.push(bugColumn('bug_severity', { width: '130', is_required: true }));
74
+ columns.push(bugColumn('bug_type', { width: '150', is_required: true }));
75
+ columns.push(bugColumn('bug_resolution', { width: '150', is_required: true, is_hide: true }));
76
+ columns.push(bugColumn('assigned_to', { width: '220', is_required: true }));
77
+ columns.push(bugColumn('created_at', { width: '170', is_required: true }));
78
+ columns.push(bugColumn('completed_at', { width: '170', is_required: true, is_hide: true }));
79
+ columns.push(createGoToColumn(bug_model, locale, { field: 'bug_id' }));
80
+
81
+ return columns;
82
+ }
83
+
84
+
85
+ /**
86
+ * Секции `bug_relation`: `test_cases`, `bugs`.
46
87
  *
47
88
  * @param {Object<string, Object<string, { config: import('../../../types/family_service/typeTableConfiguration.js').typeTableConfiguration }>>} config
48
89
  * @returns {void}
@@ -54,4 +95,8 @@ export function bootstrap_bug_relation(config)
54
95
  registerSection(config, 'bug_relation', 'test_cases', build_bug_relation_test_cases_columns(locale), {
55
96
  for: createListingFor([ 'bug_id', 'relation_type' ], { add: [ 'elements' ] }),
56
97
  });
98
+
99
+ registerSection(config, 'bug_relation', 'bugs', build_bug_relation_bugs_columns(locale), {
100
+ for: createListingFor([ 'relation_type', 'element_id' ], { add: [ 'bugs' ] }),
101
+ });
57
102
  }