mirror of
https://github.com/Combodo/iTop.git
synced 2026-10-07 00:49:09 +02:00
Compare commits
3 Commits
3.3.0
...
issue/1008
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
63cae008b9 | ||
|
|
d051d51699 | ||
|
|
16d68fe993 |
@@ -110,11 +110,11 @@ gitGraph
|
||||
commit id: "2025-09-25" tag: "2.7.13"
|
||||
checkout support/3.2
|
||||
commit id: "2026-04-27 " tag: "3.2.3"
|
||||
checkout support/3.2.3
|
||||
commit id: "2026-05-25 " tag: "3.2.3-1"
|
||||
commit id: "2026-07-17 " tag: "3.2.3-2"
|
||||
checkout develop
|
||||
commit id: "2026-07-23" tag: "3.3.0-beta1"
|
||||
commit id: "2026-09-15" tag: "3.3.0"
|
||||
```
|
||||
|
||||
To learn more, check the [iTop community versions history on the official wiki](https://www.itophub.io/wiki/page?id=latest:release:start).
|
||||
|
||||
56
.github/workflows/action.yml
vendored
56
.github/workflows/action.yml
vendored
@@ -1,56 +0,0 @@
|
||||
name: Add PRs to Combodo PRs Dashboard
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
issues:
|
||||
types:
|
||||
- opened
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
add-to-project:
|
||||
name: Add PR to Combodo Project
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check if author is a member of the organization
|
||||
id: check-membership
|
||||
run: |
|
||||
ORG="Combodo"
|
||||
AUTHOR=$(jq -r .pull_request.user.login "$GITHUB_EVENT_PATH")
|
||||
RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token ${{ secrets.PR_AUTOMATICALLY_ADD_TO_PROJECT }}" \
|
||||
"https://api.github.com/orgs/$ORG/members/$AUTHOR")
|
||||
if [ "$RESPONSE" == "404" ]; then
|
||||
echo "project_url=https://github.com/orgs/Combodo/projects/5" >> $GITHUB_ENV
|
||||
echo "is_member=false" >> $GITHUB_ENV
|
||||
else
|
||||
echo "project_url=https://github.com/orgs/Combodo/projects/4" >> $GITHUB_ENV
|
||||
echo "is_member=true" >> $GITHUB_ENV
|
||||
|
||||
fi
|
||||
|
||||
- name: Add internal tag if member of the organization
|
||||
if: env.is_member == 'true'
|
||||
run: |
|
||||
curl -X POST -H "Authorization: token ${{ secrets.PR_AUTOMATICALLY_ADD_TO_PROJECT }}" \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels \
|
||||
-d '{"labels":["internal"]}'
|
||||
|
||||
- name: Set PR author as assignee if member of the organization
|
||||
if: env.is_member == 'true' && github.event_name == 'pull_request'
|
||||
run: |
|
||||
curl -L \
|
||||
-X POST \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
-H "Authorization: Bearer ${{ secrets.PR_AUTOMATICALLY_ADD_TO_PROJECT }}" \
|
||||
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/assignees \
|
||||
-d '{"assignees":["${{ github.event.pull_request.user.login }}"]}'
|
||||
env:
|
||||
is_member: ${{ env.is_member }}
|
||||
- name: Add PR to the appropriate project
|
||||
uses: actions/add-to-project@v2
|
||||
with:
|
||||
project-url: ${{ env.project_url }}
|
||||
github-token: ${{ secrets.PR_AUTOMATICALLY_ADD_TO_PROJECT }}
|
||||
13
.github/workflows/add-to-dashboard.yml
vendored
Normal file
13
.github/workflows/add-to-dashboard.yml
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
name: Add issue/PR to Combodo dashboard
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened]
|
||||
issues:
|
||||
types: [opened]
|
||||
|
||||
jobs:
|
||||
route-to-project:
|
||||
uses: Combodo/.github/.github/workflows/action.yml@master
|
||||
secrets:
|
||||
PR_AUTOMATICALLY_ADD_TO_PROJECT: ${{ secrets.PR_AUTOMATICALLY_ADD_TO_PROJECT }}
|
||||
@@ -2430,24 +2430,25 @@ class ListExpression extends Expression
|
||||
|
||||
class NestedQueryExpression extends Expression
|
||||
{
|
||||
/** @var DBSearch */
|
||||
/** @var OQLQuery */
|
||||
protected $m_oNestedQuery;
|
||||
|
||||
/*$m_oNestedQuery is an DBSearch object*/
|
||||
/**
|
||||
* @param OQLQuery $oNestedQuery
|
||||
*/
|
||||
public function __construct($oNestedQuery)
|
||||
{
|
||||
$this->m_oNestedQuery = $oNestedQuery;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param OQLObjectQuery $oObjQuery
|
||||
* @param OQLQuery $oObjQuery
|
||||
*
|
||||
* @return \NestedQueryExpression
|
||||
*/
|
||||
public static function FromOQLObjectQuery($oObjQuery)
|
||||
{
|
||||
$oExpressions = $oObjQuery->ToDBSearch("");
|
||||
return new NestedQueryExpression($oExpressions);
|
||||
return new NestedQueryExpression($oObjQuery);
|
||||
}
|
||||
|
||||
public function IsTrue()
|
||||
@@ -2472,19 +2473,22 @@ class NestedQueryExpression extends Expression
|
||||
*/
|
||||
public function RenderExpression($bForSQL = false, &$aArgs = null, $bRetrofitParams = false)
|
||||
{
|
||||
if ($bForSQL)
|
||||
{
|
||||
$aAttToLoad = array();
|
||||
foreach ($this->m_oNestedQuery->GetSelectedClasses() as $sClassAlias => $sClass)
|
||||
{
|
||||
$aAttToLoad[$sClassAlias] = array();
|
||||
}
|
||||
return '('.$this->m_oNestedQuery->MakeSelectQuery(array(), $aArgs, $aAttToLoad).')';
|
||||
}
|
||||
else
|
||||
{
|
||||
return '('.$this->m_oNestedQuery->ToOQL(false, null, false).')';
|
||||
}
|
||||
// TODO implement in OQLQuery
|
||||
throw new Exception('a nested query cannot be rendered');
|
||||
|
||||
// if ($bForSQL)
|
||||
// {
|
||||
// $aAttToLoad = array();
|
||||
// foreach ($this->m_oNestedQuery->GetSelectedClasses() as $sClassAlias => $sClass)
|
||||
// {
|
||||
// $aAttToLoad[$sClassAlias] = array();
|
||||
// }
|
||||
// return '('.$this->m_oNestedQuery->MakeSelectQuery(array(), $aArgs, $aAttToLoad).')';
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return '('.$this->m_oNestedQuery->ToOQL(false, null, false).')';
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2504,6 +2508,7 @@ class NestedQueryExpression extends Expression
|
||||
|
||||
/**/
|
||||
public function ApplyParameters($aArgs) {
|
||||
// TODO implement in OQLQuery
|
||||
$this->m_oNestedQuery->ApplyParameters($aArgs);
|
||||
}
|
||||
|
||||
@@ -2514,6 +2519,7 @@ class NestedQueryExpression extends Expression
|
||||
/**/
|
||||
public function Translate($aTranslationData, $bMatchAll = true, $bMarkFieldsAsResolved = true) {
|
||||
// Check and prepare the select information
|
||||
// TODO implement in OQLQuery
|
||||
$this->m_oNestedQuery->TranslateConditions($aTranslationData, $bMatchAll, $bMarkFieldsAsResolved);
|
||||
|
||||
return clone $this;
|
||||
@@ -2527,18 +2533,22 @@ class NestedQueryExpression extends Expression
|
||||
}
|
||||
|
||||
public function ListConstantFields() {
|
||||
// TODO implement in OQLQuery
|
||||
return $this->m_oNestedQuery->ListConstantFields();
|
||||
}
|
||||
|
||||
public function ListParameters() {
|
||||
// TODO implement in OQLQuery
|
||||
return $this->m_oNestedQuery->GetExpectedArguments();
|
||||
}
|
||||
|
||||
public function RenameParam($sOldName, $sNewName) {
|
||||
// TODO implement in OQLQuery
|
||||
$this->m_oNestedQuery->RenameParam($sOldName, $sNewName);
|
||||
}
|
||||
|
||||
public function RenameAlias($sOldName, $sNewName) {
|
||||
// TODO implement in OQLQuery
|
||||
$this->m_oNestedQuery->RenameAlias($sOldName, $sNewName);
|
||||
}
|
||||
|
||||
@@ -2546,6 +2556,7 @@ class NestedQueryExpression extends Expression
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function ToJSON(&$aArgs = null, $bRetrofitParams = false) {
|
||||
// TODO implement in OQLQuery
|
||||
return $this->m_oNestedQuery->ToJSON();
|
||||
}
|
||||
|
||||
@@ -2557,6 +2568,7 @@ class NestedQueryExpression extends Expression
|
||||
* @uses \DBSearch::AllowAllData()
|
||||
*/
|
||||
public function AllowAllData($bAllowAllData = true) {
|
||||
// TODO implement in OQLQuery
|
||||
$this->m_oNestedQuery->AllowAllData($bAllowAllData);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,18 +193,15 @@ class ScalarOqlExpression extends ScalarExpression implements CheckableExpressio
|
||||
|
||||
class NestedQueryOqlExpression extends NestedQueryExpression implements CheckableExpression
|
||||
{
|
||||
/** @var OQLObjectQuery */
|
||||
private $m_oOQLObjectQuery;
|
||||
|
||||
/**
|
||||
* NestedQueryOqlExpression constructor.
|
||||
*
|
||||
* @param OQLObjectQuery $oOQLObjectQuery
|
||||
* @param OQLQuery $oOQLObjectQuery
|
||||
*/
|
||||
public function __construct($oOQLObjectQuery)
|
||||
public function __construct(OQLQuery $oOQLObjectQuery)
|
||||
{
|
||||
parent::__construct($oOQLObjectQuery->ToDBSearch(""));
|
||||
$this->m_oOQLObjectQuery = $oOQLObjectQuery;
|
||||
parent::__construct($oOQLObjectQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -219,12 +216,12 @@ class NestedQueryOqlExpression extends NestedQueryExpression implements Checkabl
|
||||
*/
|
||||
public function Check(ModelReflection $oModelReflection, $aAliases, $sSourceQuery)
|
||||
{
|
||||
$this->m_oOQLObjectQuery->Check($oModelReflection, "", $aAliases);
|
||||
$this->m_oNestedQuery->Check($oModelReflection, "", $aAliases);
|
||||
}
|
||||
|
||||
public function GetOQLObjectQuery()
|
||||
{
|
||||
return $this->m_oOQLObjectQuery;
|
||||
return $this->m_oNestedQuery;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user