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

tylernathanreed / jira-client-php / 13634794100

03 Mar 2025 03:19PM UTC coverage: 2.067% (-0.1%) from 2.21%
13634794100

push

github

web-flow
~ Try coveralls action

140 of 6773 relevant lines covered (2.07%)

0.03 hits per line

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

0.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
     */
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(
×
50
        Schema\WorkflowSchemeProjectAssociation $request,
51
    ): true {
52
        return $this->call(
×
53
            uri: '/rest/api/3/workflowscheme/project',
×
54
            method: 'put',
×
55
            body: $request,
×
56
            success: 204,
×
57
            schema: true,
×
58
        );
×
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