From af23f344ce2f3ad9fa37abde6949831e370cc22e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean=20Traull=C3=A9?= <613615+jtraulle@users.noreply.github.com> Date: Mon, 26 Aug 2019 14:23:14 +0200 Subject: [PATCH 1/3] Use distinct Github issue templates for Bugs and Feature requests This allow to have distinct placeholder texts and auto-assign labels (Bug or Feature request). --- .github/ISSUE_TEMPLATE/bug_report.md | 35 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 27 +++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000000..432f30f2332 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,35 @@ +--- +name: Bug report +about: Create a report to help us fix something that is broken +title: '' +labels: Bug +assignees: '' + +--- + +# Instructions +*This is a template to help you report good issues. You may use [Github Markdown](https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/) syntax to format your issue report.* +*Please:* +- *replace the bracket enclosed texts with meaningful information* +- *remove any unused sub-section* + + +# Bug +[*Short description*] + +## Environment +- **Version**: [*Affected Dolibarr version(s)*] +- **OS**: [*Server OS type and version*] +- **Web server**: [*Webserver type and version*] +- **PHP**: [*PHP version*] +- **Database**: [*Database type and version*] +- **URL(s)**: [*Affected URL(s)*] + +## Expected and actual behavior +[*Verbose description*] + +## Steps to reproduce the behavior +[*Verbose description*] + +## [Attached files](https://help.github.com/articles/issue-attachments) (Screenshots, screencasts, dolibarr.log, debugging informations…) +[*Files*] diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000000..32e2deff2c1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,27 @@ +--- +name: Feature request +about: Suggest a new idea for this project +title: '' +labels: Feature request +assignees: '' + +--- + +# Instructions +*This is a template to help you report good issues. You may use [Github Markdown](https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/) syntax to format your issue report.* +*Please:* +- *replace the bracket enclosed texts with meaningful information* +- *remove any unused sub-section* + + +# Feature Request +[*Short description*] + +## Use case +[*Verbose description*] + +## Suggested implementation +[*Verbose description*] + +## Suggested steps +[*List of tasks to achieve goal*] From 92ea663266ef46863ee88fc219a7cdaa183e423e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean=20Traull=C3=A9?= <613615+jtraulle@users.noreply.github.com> Date: Mon, 26 Aug 2019 14:27:43 +0200 Subject: [PATCH 2/3] Delete old issue template --- .github/ISSUE_TEMPLATE.md | 41 --------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index a105eed20ea..00000000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,41 +0,0 @@ -# Instructions -*This is a template to help you report good issues. You may use [Github Markdown](https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/) syntax to format your issue report.* -*Please:* -- *only keep the "Bug" or "Feature Request" section* -- *replace the bracket enclosed texts with meaningful informations* -- *remove any unused sub-section* - - -# Bug -[*Short description*] - -## Environment -- **Version**: [*Affected Dolibarr version(s)*] -- **OS**: [*Server OS type and version*] -- **Web server**: [*Webserver type and version*] -- **PHP**: [*PHP version*] -- **Database**: [*Database type and version*] -- **URL(s)**: [*Affected URL(s)*] - -## Expected and actual behavior -[*Verbose description*] - -## Steps to reproduce the behavior -[*Verbose description*] - -## [Attached files](https://help.github.com/articles/issue-attachments) (Screenshots, screencasts, dolibarr.log, debugging informations…) -[*Files*] - - - -# Feature Request -[*Short description*] - -## Use case -[*Verbose description*] - -## Suggested implementation -[*Verbose description*] - -## Suggested steps -[*List of tasks to achieve goal*] From bc14f3979d63fe156661bbabc51b06ce9bf0378d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean=20Traull=C3=A9?= <613615+jtraulle@users.noreply.github.com> Date: Mon, 26 Aug 2019 15:19:51 +0200 Subject: [PATCH 3/3] Fix CI --- htdocs/stripe/class/stripe.class.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/htdocs/stripe/class/stripe.class.php b/htdocs/stripe/class/stripe.class.php index c6df1206d0f..cf683671c5d 100644 --- a/htdocs/stripe/class/stripe.class.php +++ b/htdocs/stripe/class/stripe.class.php @@ -78,9 +78,10 @@ class Stripe extends CommonObject * Return main company OAuth Connect stripe account * * @param string $mode 'StripeTest' or 'StripeLive' + * @param int $fk_soc Id of thirdparty * @return string Stripe account 'acc_....' or '' if no OAuth token found */ - public function getStripeAccount($mode = 'StripeTest') + public function getStripeAccount($mode = 'StripeTest', $fk_soc = 0) { global $conf; @@ -88,6 +89,13 @@ class Stripe extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."oauth_token"; $sql.= " WHERE entity = ".$conf->entity; $sql.= " AND service = '".$mode."'"; + if ($fk_soc > 0) { + $sql.= " AND fk_soc = ".$fk_soc; + } + else { + $sql.= " AND fk_soc IS NULL"; + } + $sql.= " AND fk_user IS NULL AND fk_adherent IS NULL"; dol_syslog(get_class($this) . "::fetch", LOG_DEBUG); $result = $this->db->query($sql);