Merged in release/3.7.2 (pull request #8323)

release/3.7.2

Approved-by: Julio Cesar Laura Avendaño
This commit is contained in:
Paula Quispe
2021-12-14 16:23:45 +00:00
committed by Julio Cesar Laura Avendaño
20 changed files with 250 additions and 167 deletions

View File

@@ -35,9 +35,9 @@
"laravel/framework": "5.7.*",
"luracast/restler": "3.0",
"bshaffer/oauth2-server-php": "v1.0",
"colosa/pmui": "release/3.7.0-dev",
"colosa/michelangelofe": "release/3.7.0-dev",
"colosa/pmdynaform": "release/3.7.0-dev",
"colosa/pmui": "release/3.7.2-dev",
"colosa/michelangelofe": "release/3.7.2-dev",
"colosa/pmdynaform": "release/3.7.2-dev",
"colosa/taskscheduler": "release/1.0.2-dev",
"google/apiclient": "1.1.6",
"dapphp/securimage": "^3.6",

View File

@@ -26,6 +26,7 @@ $factory->define(\ProcessMaker\Model\Process::class, function (Faker $faker) {
'PRO_DYNAFORMS' => serialize([]),
'PRO_ITEE' => 1,
'PRO_ACTION_DONE' => serialize([]),
'PRO_SUBPROCESS' => 0,
'PRO_CATEGORY' => function () {
return factory(\ProcessMaker\Model\ProcessCategory::class)->create()->CATEGORY_UID;
},
@@ -56,6 +57,7 @@ $factory->state(\ProcessMaker\Model\Process::class, 'foreign_keys', function (Fa
'PRO_DYNAFORMS' => serialize([]),
'PRO_ITEE' => 1,
'PRO_ACTION_DONE' => serialize([]),
'PRO_SUBPROCESS' => 0,
'PRO_CATEGORY' => function () {
return factory(\ProcessMaker\Model\ProcessCategory::class)->create()->CATEGORY_UID;
},

View File

@@ -16,14 +16,6 @@
stacked
></b-form-radio-group>
<b-form-group> </b-form-group>
<b-form-checkbox
id="checkbox-1"
v-model="byProcessName"
name="checkbox-1"
value="processName"
>
{{ $t("ID_BY_PROCESS_NAME") }}
</b-form-checkbox>
<b-form-checkbox
id="checkbox-2"
v-model="byProcessCategory"
@@ -32,6 +24,14 @@
>
{{ $t("ID_BY_PROCESS_CATEGORY") }}
</b-form-checkbox>
<b-form-checkbox
id="checkbox-1"
v-model="byProcessName"
name="checkbox-1"
value="processName"
>
{{ $t("ID_BY_PROCESS_NAME") }}
</b-form-checkbox>
</b-form-group>
</template>
</SearchPopover>

View File

@@ -17,14 +17,6 @@
stacked
></b-form-radio-group>
</b-form-group>
<b-form-checkbox
id="checkbox-1"
v-model="byProcessName"
name="checkbox-1"
value="processName"
>
{{$t('ID_BY_PROCESS_NAME') }}
</b-form-checkbox>
<b-form-checkbox
id="checkbox-2"
v-model="byProcessCategory"
@@ -33,7 +25,14 @@
>
{{$t('ID_BY_PROCESS_CATEGORY') }}
</b-form-checkbox>
<b-form-checkbox
id="checkbox-1"
v-model="byProcessName"
name="checkbox-1"
value="processName"
>
{{$t('ID_BY_PROCESS_NAME') }}
</b-form-checkbox>
</template>
</SearchPopover>

View File

@@ -49,12 +49,12 @@
<div slot="case_status" slot-scope="props">
{{ props.row.APP_STATUS }}
</div>
<div slot="process_name" slot-scope="props">
{{ props.row.PROCESS_NAME }}
</div>
<div slot="process_category" slot-scope="props">
{{ props.row.PROCESS_CATEGORY }}
</div>
<div slot="process_name" slot-scope="props">
{{ props.row.PROCESS_NAME }}
</div>
<div slot="task" slot-scope="props">
<TaskCell :data="props.row.TASK" />
</div>
@@ -145,8 +145,8 @@ export default {
},
columns: [
"case_number",
"process_name",
"process_category",
"process_name",
"status",
"thread_title",
"task",
@@ -161,8 +161,8 @@ export default {
filterable: false,
headings: {
case_number: this.$i18n.t("ID_MYCASE_NUMBER"),
process_name: this.$i18n.t("ID_PROCESS_NAME"),
process_category: this.$i18n.t("ID_CATEGORY_PROCESS"),
process_name: this.$i18n.t("ID_PROCESS_NAME"),
status: this.$i18n.t("ID_STATUS"),
thread_title: this.$i18n.t('ID_CASE_THREAD_TITLE'),
task: this.$i18n.t("ID_TASK"),

View File

@@ -55,12 +55,12 @@
<div slot="case_title" slot-scope="props">
{{ props.row.THREAD_TITLE }}
</div>
<div slot="process_name" slot-scope="props">
{{ props.row.PROCESS_NAME }}
</div>
<div slot="process_category" slot-scope="props">
{{ props.row.PROCESS_CATEGORY }}
</div>
<div slot="process_name" slot-scope="props">
{{ props.row.PROCESS_NAME }}
</div>
<div slot="task" slot-scope="props">
<TaskCell :data="props.row.TASK" />
</div>
@@ -130,12 +130,12 @@
<span v-if="column === 'thread_title'" class="v-card-text-highlight">
{{ props["item"]["THREAD_TITLE"] }}
</span>
<span v-if="column === 'process_name'" class="v-card-text-highlight">
{{ props["item"]["PROCESS_NAME"] }}
</span>
<span v-if="column === 'process_category'" class="v-card-text-highlight">
{{ props["item"]["PROCESS_CATEGORY"] }}
</span>
<span v-if="column === 'process_name'" class="v-card-text-highlight">
{{ props["item"]["PROCESS_NAME"] }}
</span>
<span v-if="column === 'due_date'" class="v-card-text-highlight">
{{ props["item"]["DUE_DATE"] }}
</span>
@@ -187,12 +187,12 @@
<span v-if="column === 'thread_title'" class="v-card-text-highlight">
{{ props["item"]["THREAD_TITLE"] }}
</span>
<span v-if="column === 'process_name'" class="v-card-text-highlight">
{{ props["item"]["PROCESS_NAME"] }}
</span>
<span v-if="column === 'process_category'" class="v-card-text-highlight">
{{ props["item"]["PROCESS_CATEGORY"] }}
</span>
<span v-if="column === 'process_name'" class="v-card-text-highlight">
{{ props["item"]["PROCESS_NAME"] }}
</span>
<span v-if="column === 'due_date'" class="v-card-text-highlight">
{{ props["item"]["DUE_DATE"] }}
</span>
@@ -565,28 +565,6 @@ export default {
return `${this.tagPrefix}: ${data[0].label || ""}`;
},
},
processName: {
group: "checkbox",
type: "ProcessName",
id: "processName",
title: `${this.$i18n.t('ID_FILTER')}: ${this.$i18n.t('ID_BY_PROCESS_NAME')}`,
optionLabel: this.$i18n.t('ID_BY_PROCESS_NAME'),
detail: "",
tagText: "",
tagPrefix: this.$i18n.t('ID_SEARCH_BY_PROCESS_NAME'),
autoShow: false,
items:[
{
id: "process",
value: "",
options: [],
placeholder: this.$i18n.t('ID_PROCESS_NAME')
}
],
makeTagText: function (params, data) {
return `${this.tagPrefix} ${data[0].options && data[0].options.label || ''}`;
}
},
processCategory: {
group: "checkbox",
type: "ProcessCategory",
@@ -609,6 +587,28 @@ export default {
return `${this.tagPrefix} ${data[0].options && data[0].options.label || ''}`;
}
},
processName: {
group: "checkbox",
type: "ProcessName",
id: "processName",
title: `${this.$i18n.t('ID_FILTER')}: ${this.$i18n.t('ID_BY_PROCESS_NAME')}`,
optionLabel: this.$i18n.t('ID_BY_PROCESS_NAME'),
detail: "",
tagText: "",
tagPrefix: this.$i18n.t('ID_SEARCH_BY_PROCESS_NAME'),
autoShow: false,
items:[
{
id: "process",
value: "",
options: [],
placeholder: this.$i18n.t('ID_PROCESS_NAME')
}
],
makeTagText: function (params, data) {
return `${this.tagPrefix} ${data[0].options && data[0].options.label || ''}`;
}
},
showUserTooltip: true
}
};

View File

@@ -51,12 +51,12 @@
<div slot="thread_title" slot-scope="props">
{{ props.row.THREAD_TITLE }}
</div>
<div slot="process_name" slot-scope="props">
{{ props.row.PROCESS_NAME }}
</div>
<div slot="process_category" slot-scope="props">
{{ props.row.PROCESS_CATEGORY }}
</div>
<div slot="process_name" slot-scope="props">
{{ props.row.PROCESS_NAME }}
</div>
<div slot="task" slot-scope="props">
<TaskCell :data="props.row.TASK" />
</div>
@@ -99,14 +99,6 @@
{{ props["item"]["THREAD_TITLE"] }}
</span>
</div>
<div slot="process_name" slot-scope="props" class="v-card-text">
<span class="v-card-text-dark"
>{{ props["headings"][props.column] }} :</span
>
<span class="v-card-text-light"
>{{ props["item"]["PROCESS_NAME"] }}
</span>
</div>
<div slot="process_category" slot-scope="props" class="v-card-text">
<span class="v-card-text-dark"
>{{ props["headings"][props.column] }} :</span
@@ -115,6 +107,14 @@
>{{ props["item"]["PROCESS_CATEGORY"] }}
</span>
</div>
<div slot="process_name" slot-scope="props" class="v-card-text">
<span class="v-card-text-dark"
>{{ props["headings"][props.column] }} :</span
>
<span class="v-card-text-light"
>{{ props["item"]["PROCESS_NAME"] }}
</span>
</div>
<div slot="due_date" slot-scope="props" class="v-card-text">
<span class="v-card-text-dark"
>{{ props["headings"][props.column] }} :</span
@@ -181,14 +181,6 @@
{{ props["item"]["THREAD_TITLE"] }}
</span>
</div>
<div slot="process_name" slot-scope="props" class="v-card-text">
<span class="v-card-text-dark"
>{{ props["headings"][props.column] }} :</span
>
<span class="v-card-text-light"
>{{ props["item"]["PROCESS_NAME"] }}
</span>
</div>
<div slot="process_category" slot-scope="props" class="v-card-text">
<span class="v-card-text-dark"
>{{ props["headings"][props.column] }} :</span
@@ -197,6 +189,14 @@
>{{ props["item"]["PROCESS_CATEGORY"] }}
</span>
</div>
<div slot="process_name" slot-scope="props" class="v-card-text">
<span class="v-card-text-dark"
>{{ props["headings"][props.column] }} :</span
>
<span class="v-card-text-light"
>{{ props["item"]["PROCESS_NAME"] }}
</span>
</div>
<div slot="due_date" slot-scope="props" class="v-card-text">
<span class="v-card-text-dark"
>{{ props["headings"][props.column] }} :</span
@@ -314,8 +314,8 @@ export default {
detail: this.$i18n.t("ID_DETAIL_CASE"),
case_number: this.$i18n.t("ID_MYCASE_NUMBER"),
thread_title: this.$i18n.t('ID_CASE_THREAD_TITLE'),
process_name: this.$i18n.t("ID_PROCESS_NAME"),
process_category: this.$i18n.t("ID_CATEGORY_PROCESS"),
process_name: this.$i18n.t("ID_PROCESS_NAME"),
task: this.$i18n.t("ID_TASK"),
priority: this.$i18n.t("ID_PRIORITY"),
actions: ""

View File

@@ -53,8 +53,8 @@ export default {
detail: "",
case_number: this.$i18n.t("ID_MYCASE_NUMBER"),
thread_title: this.$i18n.t('ID_CASE_THREAD_TITLE'),
process_name: this.$i18n.t("ID_PROCESS_NAME"),
process_category: this.$i18n.t("ID_CATEGORY_PROCESS"),
process_name: this.$i18n.t("ID_PROCESS_NAME"),
task: this.$i18n.t("ID_TASK"),
current_user: this.$i18n.t("ID_CURRENT_USER"),
due_date: this.$i18n.t("ID_DUE_DATE"),

View File

@@ -46,12 +46,12 @@
<div slot="thread_title" slot-scope="props">
{{ props.row.THREAD_TITLE }}
</div>
<div slot="process_name" slot-scope="props">
{{ props.row.PROCESS_NAME }}
</div>
<div slot="process_category" slot-scope="props">
{{ props.row.PROCESS_CATEGORY }}
</div>
<div slot="process_name" slot-scope="props">
{{ props.row.PROCESS_NAME }}
</div>
<div slot="task" slot-scope="props">
<TaskCell :data="props.row.TASK" />
</div>
@@ -106,14 +106,6 @@
{{ props["item"]["THREAD_TITLE"] }}
</span>
</div>
<div slot="process_name" slot-scope="props" class="v-card-text">
<span class="v-card-text-dark"
>{{ props["headings"][props.column] }} :</span
>
<span class="v-card-text-light"
>{{ props["item"]["PROCESS_NAME"] }}
</span>
</div>
<div slot="process_category" slot-scope="props" class="v-card-text">
<span class="v-card-text-dark"
>{{ props["headings"][props.column] }} :</span
@@ -122,6 +114,14 @@
>{{ props["item"]["PROCESS_CATEGORY"] }}
</span>
</div>
<div slot="process_name" slot-scope="props" class="v-card-text">
<span class="v-card-text-dark"
>{{ props["headings"][props.column] }} :</span
>
<span class="v-card-text-light"
>{{ props["item"]["PROCESS_NAME"] }}
</span>
</div>
<div slot="due_date" slot-scope="props" class="v-card-text">
<span class="v-card-text-dark"
>{{ props["headings"][props.column] }} :</span
@@ -195,14 +195,6 @@
{{ props["item"]["THREAD_TITLE"] }}
</span>
</div>
<div slot="process_name" slot-scope="props" class="v-card-text">
<span class="v-card-text-dark"
>{{ props["headings"][props.column] }} :</span
>
<span class="v-card-text-light"
>{{ props["item"]["PROCESS_NAME"] }}
</span>
</div>
<div slot="process_category" slot-scope="props" class="v-card-text">
<span class="v-card-text-dark"
>{{ props["headings"][props.column] }} :</span
@@ -211,6 +203,14 @@
>{{ props["item"]["PROCESS_CATEGORY"] }}
</span>
</div>
<div slot="process_name" slot-scope="props" class="v-card-text">
<span class="v-card-text-dark"
>{{ props["headings"][props.column] }} :</span
>
<span class="v-card-text-light"
>{{ props["item"]["PROCESS_NAME"] }}
</span>
</div>
<div slot="due_date" slot-scope="props" class="v-card-text">
<span class="v-card-text-dark"
>{{ props["headings"][props.column] }} :</span
@@ -345,8 +345,8 @@ export default {
detail: this.$i18n.t("ID_DETAIL_CASE"),
case_number: this.$i18n.t("ID_MYCASE_NUMBER"),
thread_title: this.$i18n.t('ID_CASE_THREAD_TITLE'),
process_name: this.$i18n.t("ID_PROCESS_NAME"),
process_category: this.$i18n.t("ID_CATEGORY_PROCESS"),
process_name: this.$i18n.t("ID_PROCESS_NAME"),
task: this.$i18n.t("ID_TASK"),
send_by: this.$i18n.t("ID_SEND_BY"),
due_date: this.$i18n.t("ID_DUE_DATE"),

View File

@@ -53,8 +53,8 @@ export default {
headings: {
case_number: this.$i18n.t("ID_MYCASE_NUMBER"),
thread_title: this.$i18n.t('ID_CASE_THREAD_TITLE'),
process_name: this.$i18n.t("ID_PROCESS_NAME"),
process_category: this.$i18n.t("ID_CATEGORY_PROCESS"),
process_name: this.$i18n.t("ID_PROCESS_NAME"),
task: this.$i18n.t("ID_TASK"),
send_by: this.$i18n.t("ID_SEND_BY"),
current_user: this.$i18n.t("ID_CURRENT_USER"),
@@ -65,8 +65,8 @@ export default {
columns: [
"case_number",
"thread_title",
"process_name",
"process_category",
"process_name",
"due_date",
"delegation_date",
"priority",

View File

@@ -47,12 +47,12 @@
<div slot="thread_title" slot-scope="props">
<ThreadTitleCell :data="props.row.THREAD_TITLE" />
</div>
<div slot="process_name" slot-scope="props">
{{ props.row.PROCESS_NAME }}
</div>
<div slot="process_category" slot-scope="props">
{{ props.row.PROCESS_CATEGORY }}
</div>
<div slot="process_name" slot-scope="props">
{{ props.row.PROCESS_NAME }}
</div>
<div slot="pending_taks" slot-scope="props">
<GroupedCell :data="props.row.PENDING_TASKS" />
</div>
@@ -163,8 +163,8 @@ export default {
filterable: false,
headings: {
case_number: this.$i18n.t("ID_MYCASE_NUMBER"),
process_name: this.$i18n.t("ID_PROCESS_NAME"),
process_category: this.$i18n.t("ID_CATEGORY_PROCESS"),
process_name: this.$i18n.t("ID_PROCESS_NAME"),
thread_title: this.$i18n.t('ID_CASE_THREAD_TITLE'),
pending_taks: this.$i18n.t("ID_PENDING_TASKS"),
status: this.$i18n.t("ID_CASESLIST_APP_STATUS"),

View File

@@ -45,12 +45,12 @@
<div slot="thread_title" slot-scope="props">
{{ props.row.THREAD_TITLE }}
</div>
<div slot="process_name" slot-scope="props">
{{ props.row.PROCESS_NAME }}
</div>
<div slot="process_category" slot-scope="props">
{{ props.row.PROCESS_CATEGORY }}
</div>
<div slot="process_name" slot-scope="props">
{{ props.row.PROCESS_NAME }}
</div>
<div slot="task" slot-scope="props">
<TaskCell :data="props.row.TASK" />
</div>
@@ -105,14 +105,6 @@
{{ props["item"]["THREAD_TITLE"] }}
</span>
</div>
<div slot="process_name" slot-scope="props" class="v-card-text">
<span class="v-card-text-dark"
>{{ props["headings"][props.column] }} :</span
>
<span class="v-card-text-light"
>{{ props["item"]["PROCESS_NAME"] }}
</span>
</div>
<div slot="process_category" slot-scope="props" class="v-card-text">
<span class="v-card-text-dark"
>{{ props["headings"][props.column] }} :</span
@@ -121,6 +113,14 @@
>{{ props["item"]["PROCESS_CATEGORY"] }}
</span>
</div>
<div slot="process_name" slot-scope="props" class="v-card-text">
<span class="v-card-text-dark"
>{{ props["headings"][props.column] }} :</span
>
<span class="v-card-text-light"
>{{ props["item"]["PROCESS_NAME"] }}
</span>
</div>
<div slot="due_date" slot-scope="props" class="v-card-text">
<span class="v-card-text-dark"
>{{ props["headings"][props.column] }} :</span
@@ -194,14 +194,6 @@
{{ props["item"]["THREAD_TITLE"] }}
</span>
</div>
<div slot="process_name" slot-scope="props" class="v-card-text">
<span class="v-card-text-dark"
>{{ props["headings"][props.column] }} :</span
>
<span class="v-card-text-light"
>{{ props["item"]["PROCESS_NAME"] }}
</span>
</div>
<div slot="process_category" slot-scope="props" class="v-card-text">
<span class="v-card-text-dark"
>{{ props["headings"][props.column] }} :</span
@@ -210,6 +202,14 @@
>{{ props["item"]["PROCESS_CATEGORY"] }}
</span>
</div>
<div slot="process_name" slot-scope="props" class="v-card-text">
<span class="v-card-text-dark"
>{{ props["headings"][props.column] }} :</span
>
<span class="v-card-text-light"
>{{ props["item"]["PROCESS_NAME"] }}
</span>
</div>
<div slot="due_date" slot-scope="props" class="v-card-text">
<span class="v-card-text-dark"
>{{ props["headings"][props.column] }} :</span
@@ -345,8 +345,8 @@ export default {
detail: this.$i18n.t("ID_DETAIL_CASE"),
case_number: this.$i18n.t("ID_MYCASE_NUMBER"),
thread_title: this.$i18n.t('ID_CASE_THREAD_TITLE'),
process_name: this.$i18n.t("ID_PROCESS_NAME"),
process_category: this.$i18n.t("ID_CATEGORY_PROCESS"),
process_name: this.$i18n.t("ID_PROCESS_NAME"),
task: this.$i18n.t("ID_TASK"),
send_by: this.$i18n.t("ID_SEND_BY"),
due_date: this.$i18n.t("ID_DUE_DATE"),

View File

@@ -52,8 +52,8 @@ export default {
headings: {
case_number: this.$i18n.t("ID_MYCASE_NUMBER"),
thread_title: this.$i18n.t('ID_CASE_THREAD_TITLE'),
process_name: this.$i18n.t("ID_PROCESS_NAME"),
process_category: this.$i18n.t("ID_CATEGORY_PROCESS"),
process_name: this.$i18n.t("ID_PROCESS_NAME"),
task: this.$i18n.t("ID_TASK"),
send_by: this.$i18n.t("ID_SEND_BY"),
current_user: this.$i18n.t("ID_CURRENT_USER"),
@@ -64,8 +64,8 @@ export default {
columns: [
"case_number",
"thread_title",
"process_name",
"process_category",
"process_name",
"due_date",
"delegation_date",
"priority",

View File

@@ -43,12 +43,12 @@
<div slot="thread_title" slot-scope="props">
{{ props.row.THREAD_TITLE }}
</div>
<div slot="process_name" slot-scope="props">
{{ props.row.PROCESS_NAME }}
</div>
<div slot="process_category" slot-scope="props">
{{ props.row.PROCESS_CATEGORY }}
</div>
<div slot="process_name" slot-scope="props">
{{ props.row.PROCESS_NAME }}
</div>
<div slot="task" slot-scope="props">
<TaskCell :data="props.row.TASK" />
</div>
@@ -100,14 +100,6 @@
{{ props["item"]["THREAD_TITLE"] }}
</span>
</div>
<div slot="process_name" slot-scope="props" class="v-card-text">
<span class="v-card-text-dark"
>{{ props["headings"][props.column] }} :</span
>
<span class="v-card-text-light"
>{{ props["item"]["PROCESS_NAME"] }}
</span>
</div>
<div slot="process_category" slot-scope="props" class="v-card-text">
<span class="v-card-text-dark"
>{{ props["headings"][props.column] }} :</span
@@ -116,6 +108,14 @@
>{{ props["item"]["PROCESS_CATEGORY"] }}
</span>
</div>
<div slot="process_name" slot-scope="props" class="v-card-text">
<span class="v-card-text-dark"
>{{ props["headings"][props.column] }} :</span
>
<span class="v-card-text-light"
>{{ props["item"]["PROCESS_NAME"] }}
</span>
</div>
<div slot="due_date" slot-scope="props" class="v-card-text">
<span class="v-card-text-dark"
>{{ props["headings"][props.column] }} :</span
@@ -189,14 +189,6 @@
{{ props["item"]["THREAD_TITLE"] }}
</span>
</div>
<div slot="process_name" slot-scope="props" class="v-card-text">
<span class="v-card-text-dark"
>{{ props["headings"][props.column] }} :</span
>
<span class="v-card-text-light"
>{{ props["item"]["PROCESS_NAME"] }}
</span>
</div>
<div slot="process_category" slot-scope="props" class="v-card-text">
<span class="v-card-text-dark"
>{{ props["headings"][props.column] }} :</span
@@ -205,6 +197,14 @@
>{{ props["item"]["PROCESS_CATEGORY"] }}
</span>
</div>
<div slot="process_name" slot-scope="props" class="v-card-text">
<span class="v-card-text-dark"
>{{ props["headings"][props.column] }} :</span
>
<span class="v-card-text-light"
>{{ props["item"]["PROCESS_NAME"] }}
</span>
</div>
<div slot="due_date" slot-scope="props" class="v-card-text">
<span class="v-card-text-dark"
>{{ props["headings"][props.column] }} :</span
@@ -337,8 +337,8 @@ export default {
detail: this.$i18n.t("ID_DETAIL_CASE"),
case_number: this.$i18n.t("ID_MYCASE_NUMBER"),
thread_title: this.$i18n.t('ID_CASE_THREAD_TITLE'),
process_name: this.$i18n.t("ID_PROCESS_NAME"),
process_category: this.$i18n.t("ID_CATEGORY_PROCESS"),
process_name: this.$i18n.t("ID_PROCESS_NAME"),
task: this.$i18n.t("ID_TASK"),
send_by: this.$i18n.t("ID_SEND_BY"),
due_date: this.$i18n.t("ID_DUE_DATE"),

View File

@@ -52,8 +52,8 @@ export default {
headings: {
case_number: this.$i18n.t("ID_MYCASE_NUMBER"),
thread_title: this.$i18n.t('ID_CASE_THREAD_TITLE'),
process_name: this.$i18n.t("ID_PROCESS_NAME"),
process_category: this.$i18n.t("ID_CATEGORY_PROCESS"),
process_name: this.$i18n.t("ID_PROCESS_NAME"),
task: this.$i18n.t("ID_TASK"),
send_by: this.$i18n.t("ID_SEND_BY"),
current_user: this.$i18n.t("ID_CURRENT_USER"),
@@ -64,8 +64,8 @@ export default {
columns: [
"case_number",
"thread_title",
"process_name",
"process_category",
"process_name",
"due_date",
"delegation_date",
"priority",

View File

@@ -258,8 +258,10 @@ class ProcessTest extends TestCase
* It tests the process list
*
* @covers \ProcessMaker\Model\Process::getProcessesFilter()
* @covers \ProcessMaker\Model\Process::getListColumns()
* @covers \ProcessMaker\Model\Process::scopeJoinUsers()
* @covers \ProcessMaker\Model\Process::scopeJoinCategory()
* @covers \ProcessMaker\Model\Process::scopeNoStatus()
* @covers \ProcessMaker\Model\Process::scopeSubProcess()
* @test
*/
public function it_should_test_process_without_filter()
@@ -278,7 +280,11 @@ class ProcessTest extends TestCase
* It tests the process list with specific category
*
* @covers \ProcessMaker\Model\Process::getProcessesFilter()
* @covers \ProcessMaker\Model\Process::getListColumns()
* @covers \ProcessMaker\Model\Process::scopeJoinUsers()
* @covers \ProcessMaker\Model\Process::scopeJoinCategory()
* @covers \ProcessMaker\Model\Process::scopeCategory()
* @covers \ProcessMaker\Model\Process::scopePerUser()
* @test
*/
public function it_should_test_process_with_category_filter()
@@ -288,16 +294,23 @@ class ProcessTest extends TestCase
return factory(ProcessCategory::class)->create()->CATEGORY_UID;
}
]);
$result = Process::getProcessesFilter(
$process->PRO_CATEGORY
);
$result = Process::getProcessesFilter($process->PRO_CATEGORY);
// Assert with the specific category
$this->assertEquals($process->PRO_CATEGORY, $result[0]['PRO_CATEGORY']);
$process = factory(Process::class)->create();
$result = Process::getProcessesFilter('NONE');
// Assert when the category is empty
$this->assertEmpty($result);
}
/**
* It tests the process list with specific process
*
* @covers \ProcessMaker\Model\Process::getProcessesFilter()
* @covers \ProcessMaker\Model\Process::getListColumns()
* @covers \ProcessMaker\Model\Process::scopeJoinUsers()
* @covers \ProcessMaker\Model\Process::scopeJoinCategory()
* @covers \ProcessMaker\Model\Process::scopeProcess()
* @test
*/
@@ -315,6 +328,9 @@ class ProcessTest extends TestCase
* It tests the process list with specific process title
*
* @covers \ProcessMaker\Model\Process::getProcessesFilter()
* @covers \ProcessMaker\Model\Process::getListColumns()
* @covers \ProcessMaker\Model\Process::scopeJoinUsers()
* @covers \ProcessMaker\Model\Process::scopeJoinCategory()
* @covers \ProcessMaker\Model\Process::scopeTitle()
* @test
*/
@@ -329,10 +345,41 @@ class ProcessTest extends TestCase
$this->assertEquals($process->PRO_TITLE, $result[0]['PRO_TITLE']);
}
/**
* It tests the process list with suprocess filter
*
* @covers \ProcessMaker\Model\Process::getProcessesFilter()
* @covers \ProcessMaker\Model\Process::getListColumns()
* @covers \ProcessMaker\Model\Process::scopeJoinUsers()
* @covers \ProcessMaker\Model\Process::scopeJoinCategory()
* @covers \ProcessMaker\Model\Process::scopeSubProcess()
* @test
*/
public function it_should_test_process_subprocess_filter()
{
$process = factory(Process::class)->create([
'PRO_SUBPROCESS' => 1
]);
$result = Process::getProcessesFilter(
null,
null,
null,
$process->PRO_CREATE_USER,
0,
25,
'ASC',
'PRO_CREATE_DATE',
true,
true
);
$this->assertEquals($process->PRO_CREATE_USER, $result[0]['USR_UID']);
}
/**
* It tests the count process
*
* @covers \ProcessMaker\Model\Process::getCounter()
* @covers \ProcessMaker\Model\Process::scopePerUser()
* @test
*/
public function it_should_test_count_process()
@@ -346,6 +393,8 @@ class ProcessTest extends TestCase
* It test get processes for the new home view
*
* @covers \ProcessMaker\Model\Process::getProcessesForHome()
* @covers \ProcessMaker\Model\Process::scopeCategoryId()
* @covers \ProcessMaker\Model\Process::scopeStatus()
* @test
*/
public function it_should_test_get_processes_for_home()
@@ -356,11 +405,13 @@ class ProcessTest extends TestCase
// Create five processes (4 active, 1 inactive)
factory(Process::class)->create([
'PRO_TITLE' => 'My Process 1',
'PRO_CATEGORY' => $processCategory->CATEGORY_UID
'PRO_CATEGORY' => $processCategory->CATEGORY_UID,
'CATEGORY_ID' => $processCategory->CATEGORY_ID
]);
factory(Process::class)->create([
'PRO_TITLE' => 'My Process 2',
'PRO_CATEGORY' => $processCategory->CATEGORY_UID
'PRO_CATEGORY' => $processCategory->CATEGORY_UID,
'CATEGORY_ID' => $processCategory->CATEGORY_ID
]);
factory(Process::class)->create([
'PRO_TITLE' => 'My Process 3',
@@ -376,8 +427,21 @@ class ProcessTest extends TestCase
// Assertions
$this->assertCount(4, Process::getProcessesForHome());
$this->assertCount(3, Process::getProcessesForHome('My Process'));
$this->assertCount(2, Process::getProcessesForHome(null, $processCategory->CATEGORY_UID));
$this->assertCount(2, Process::getProcessesForHome(null, $processCategory->CATEGORY_ID));
$this->assertCount(4, Process::getProcessesForHome(null, null, null, 2));
$this->assertCount(1, Process::getProcessesForHome(null, null, 2, 1));
$this->assertCount(1, Process::getProcessesForHome(null, null, 2, 1, true));
}
/**
* It tests the isActive process
*
* @covers \ProcessMaker\Model\Process::isActive()
* @test
*/
public function it_should_test_is_active()
{
$process = factory(Process::class)->create();
$total = Process::isActive($process->PRO_ID);
$this->assertEquals(1, $total);
}
}

View File

@@ -374,7 +374,8 @@ class WorkspaceTools
$start = microtime(true);
Bootstrap::setConstantsRelatedWs($workspace);
Propel::init(PATH_CONFIG . 'databases.php');
WebEntry::convertFromV1ToV2();
$statement = Propel::getConnection('workflow')->createStatement();
$statement->executeQuery(WebEntry::UPDATE_QUERY_V1_TO_V2);
CLI::logging("* End converting Web Entries v1.0 to v2.0 for BPMN processes...(" . (microtime(true) - $start) . " seconds)\n");
CLI::logging("* Start migrating case title...\n");

View File

@@ -383,8 +383,8 @@ class CaseList extends Model
'set' => true
], [
'list' => ['inbox', 'draft', 'paused', 'unassigned'],
'field' => 'process_name',
'name' => G::LoadTranslation('ID_PROCESS_NAME'),
'field' => 'process_category',
'name' => G::LoadTranslation('ID_PROCESS_CATEGORY'),
'type' => 'string',
'source' => 'APPLICATION',
'typeSearch' => 'search text',
@@ -392,8 +392,8 @@ class CaseList extends Model
'set' => true
], [
'list' => ['inbox', 'draft', 'paused', 'unassigned'],
'field' => 'process_category',
'name' => G::LoadTranslation('ID_PROCESS_CATEGORY'),
'field' => 'process_name',
'name' => G::LoadTranslation('ID_PROCESS_NAME'),
'type' => 'string',
'source' => 'APPLICATION',
'typeSearch' => 'search text',

View File

@@ -78,6 +78,7 @@ class Process extends Model
*
* @param \Illuminate\Database\Eloquent\Builder $query
* @param string $proUid
*
* @return \Illuminate\Database\Eloquent\Builder
*/
public function scopeProcess($query, $proUid)
@@ -90,6 +91,7 @@ class Process extends Model
*
* @param \Illuminate\Database\Eloquent\Builder $query
* @param string $title
*
* @return \Illuminate\Database\Eloquent\Builder
*/
public function scopeTitle($query, $title)
@@ -102,6 +104,7 @@ class Process extends Model
*
* @param \Illuminate\Database\Eloquent\Builder $query
* @param string $status
*
* @return \Illuminate\Database\Eloquent\Builder
*/
public function scopeNoStatus($query, $status = 'DISABLED')
@@ -120,6 +123,19 @@ class Process extends Model
return $query->where('PRO_SUBPROCESS', '=', 1);
}
/**
* Scope a query to include a specific process categoryId
*
* @param \Illuminate\Database\Eloquent\Builder $query
* @param int $category
*
* @return \Illuminate\Database\Eloquent\Builder
*/
public function scopeCategoryId($query, $category)
{
return $query->where('PROCESS.CATEGORY_ID', $category);
}
/**
* Scope a query to include a specific process category
*
@@ -407,14 +423,14 @@ class Process extends Model
* Get all processes, paged optionally, can be sent a string to filter results by "PRO_TITLE"
*
* @param string $text
* @param string $category
* @param int $catId
* @param int $offset
* @param int $limit
* @param bool $paged
*
* @return array
*/
public static function getProcessesForHome($text = null, $category = null, $offset = null, $limit = null, $paged = true)
public static function getProcessesForHome($text = null, $catId = 0, $offset = null, $limit = null, $paged = true)
{
// Get base query
$query = Process::query()->select(['PRO_ID', 'PRO_TITLE']);
@@ -424,9 +440,9 @@ class Process extends Model
$query->title($text);
}
// Set "PRO_CATEGORY" condition if is sent
if (!is_null($category)) {
$query->category($category);
// Set "CATEGORY_ID" condition if is sent
if ($catId) {
$query->categoryId($catId);
}
// Set "PRO_STATUS" condition
@@ -452,6 +468,7 @@ class Process extends Model
* Return true if process is active, false otherwise.
* @param int|string $proId
* @param string $key
*
* @return bool
*/
public static function isActive($proId, string $key = 'PRO_ID'): bool

View File

@@ -889,7 +889,7 @@ class Home extends Api
* @url GET /processes
*
* @param string $text
* @param string $category
* @param int $category
* @param int $offset
* @param int $limit
* @param bool $paged
@@ -901,7 +901,7 @@ class Home extends Api
* @access protected
* @class AccessControl {@permission PM_CASES}
*/
public function getProcesses($text = null, $category = null, int $offset = 0, int $limit = 15, $paged = true)
public function getProcesses($text = null, $category = 0, int $offset = 0, int $limit = 15, $paged = true)
{
try {
return Process::getProcessesForHome($text, $category, $offset, $limit, $paged);