• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tylernathanreed / jira-client-php / 13857440588

14 Mar 2025 01:18PM UTC coverage: 70.825% (-0.06%) from 70.885%
13857440588

push

github

tylernathanreed
~ Fixed nested objects in test examples

9 of 9 new or added lines in 1 file covered. (100.0%)

524 existing lines in 407 files now uncovered.

4826 of 6814 relevant lines covered (70.82%)

8.59 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

50.0
/src/Operations/WorkflowSchemeProjectAssociations.php
1
<?php
2

3
namespace Jira\Client\Operations;
4

5
use Jira\Client\Client;
6
use Jira\Client\Schema;
7

8
/** @phpstan-require-extends Client */
9
trait WorkflowSchemeProjectAssociations
10
{
11
    /**
12
     * Returns a list of the workflow schemes associated with a list of projects.
13
     * Each returned workflow scheme includes a list of the requested projects associated with it.
14
     * Any team-managed or non-existent projects in the request are ignored and no errors are returned
15
     * 
16
     * If the project is associated with the `Default Workflow Scheme` no ID is returned.
17
     * This is because the way the `Default Workflow Scheme` is stored means it has no ID
18
     * 
19
     * **"Permissions" required:** *Administer Jira* "global permission".
20
     * 
21
     * @link https://confluence.atlassian.com/x/x4dKLg
22
     * 
23
     * @param list<int> $projectId The ID of a project to return the workflow schemes for.
24
     *                             To include multiple projects, provide an ampersand-Jim: oneseparated list.
25
     *                             For example, `projectId=10000&projectId=10001`.
26
     */
UNCOV
27
    public function getWorkflowSchemeProjectAssociations(
×
28
        array $projectId,
29
    ): Schema\ContainerOfWorkflowSchemeAssociations {
30
        return $this->call(
×
31
            uri: '/rest/api/3/workflowscheme/project',
×
32
            method: 'get',
×
33
            query: compact('projectId'),
×
34
            success: 200,
×
35
            schema: Schema\ContainerOfWorkflowSchemeAssociations::class,
×
36
        );
×
37
    }
38

39
    /**
40
     * Assigns a workflow scheme to a project.
41
     * This operation is performed only when there are no issues in the project
42
     * 
43
     * Workflow schemes can only be assigned to classic projects
44
     * 
45
     * **"Permissions" required:** *Administer Jira* "global permission".
46
     * 
47
     * @link https://confluence.atlassian.com/x/x4dKLg
48
     */
49
    public function assignSchemeToProject(
1✔
50
        Schema\WorkflowSchemeProjectAssociation $request,
51
    ): true {
52
        return $this->call(
1✔
53
            uri: '/rest/api/3/workflowscheme/project',
1✔
54
            method: 'put',
1✔
55
            body: $request,
1✔
56
            success: 204,
1✔
57
            schema: true,
1✔
58
        );
1✔
59
    }
60
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc