Merge branch 'feat/85' of https://github.com/luketainton/FHeD into feat/85
This commit is contained in:
15
.github/workflows/assigned-issues-inprogress.yml
vendored
15
.github/workflows/assigned-issues-inprogress.yml
vendored
@@ -1,15 +0,0 @@
|
|||||||
name: Run project automation tasks
|
|
||||||
|
|
||||||
on:
|
|
||||||
issues:
|
|
||||||
types: [assigned]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
issues-inprogress:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: alex-page/github-project-automation-plus@v0.2.4
|
|
||||||
with:
|
|
||||||
project: v1.0
|
|
||||||
column: In progress
|
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
@@ -68,26 +68,23 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function get_open_subscribed_requests($db) {
|
function get_open_subscribed_requests($db) {
|
||||||
$subbed_reqs_arr = array();
|
|
||||||
$requests = array();
|
$requests = array();
|
||||||
$sub_tickets_stmt = "SELECT ticket_uuid FROM ticket_subscribers WHERE user_uuid=:uuid";
|
$all_subs = get_subscribed_requests($db);
|
||||||
$sub_tickets_sql = $db->prepare($sub_tickets_stmt);
|
foreach ($all_subs as $sub) {
|
||||||
$sub_tickets_sql->bindParam(':uuid', $_SESSION['uuid']);
|
if ($sub['status'] != 'Closed') {
|
||||||
$sub_tickets_sql->execute();
|
array_push($requests, $sub);
|
||||||
$sub_tickets_sql->setFetchMode(PDO::FETCH_ASSOC);
|
}
|
||||||
$sub_tickets_result = $sub_tickets_sql->fetchAll();
|
|
||||||
foreach ($sub_tickets_result as $tkt) {
|
|
||||||
array_push($subbed_reqs_arr, $tkt['ticket_uuid']);
|
|
||||||
}
|
}
|
||||||
$subbed_reqs = implode(",", $subbed_reqs_arr);
|
return $requests;
|
||||||
$stmt = "SELECT * FROM tickets WHERE uuid IN :uuid";
|
}
|
||||||
$sql = $db->prepare($stmt);
|
|
||||||
$sql->bindParam(':uuid', $subbed_reqs);
|
function get_closed_subscribed_requests($db) {
|
||||||
$sql->execute();
|
$requests = array();
|
||||||
$sql->setFetchMode(PDO::FETCH_ASSOC);
|
$all_subs = get_subscribed_requests($db);
|
||||||
$result = $sql->fetchAll();
|
foreach ($all_subs as $sub) {
|
||||||
foreach ($result as $sub) {
|
if ($sub['status'] == 'Closed') {
|
||||||
array_push($requests, $sub)
|
array_push($requests, $sub);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return $requests;
|
return $requests;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user