• 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/IssueCustomFieldConfigurationApps.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 IssueCustomFieldConfigurationApps
10
{
11
    /**
12
     * Returns a "paginated" list of configurations for list of custom fields of a "type" created by a "Forge app"
13
     * 
14
     * The result can be filtered by one of these criteria:
15
     * 
16
     *  - `id`
17
     *  - `fieldContextId`
18
     *  - `issueId`
19
     *  - `projectKeyOrId` and `issueTypeId`
20
     * 
21
     * Otherwise, all configurations for the provided list of custom fields are returned
22
     * 
23
     * **"Permissions" required:** *Administer Jira* "global permission".
24
     * Jira permissions are not required for the Forge app that provided the custom field type.
25
     * 
26
     * @link https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/
27
     * @link https://developer.atlassian.com/platform/forge/
28
     * @link https://confluence.atlassian.com/x/x4dKLg
29
     * 
30
     * @param ?list<int> $id The list of configuration IDs.
31
     *                       To include multiple configurations, separate IDs with an ampersand: `id=10000&id=10001`.
32
     *                       Can't be provided with `fieldContextId`, `issueId`, `projectKeyOrId`, or `issueTypeId`.
33
     * @param ?list<int> $fieldContextId The list of field context IDs.
34
     *                                   To include multiple field contexts, separate IDs with an ampersand: `fieldContextId=10000&fieldContextId=10001`.
35
     *                                   Can't be provided with `id`, `issueId`, `projectKeyOrId`, or `issueTypeId`.
36
     * @param int $issueId The ID of the issue to filter results by.
37
     *                     If the issue doesn't exist, an empty list is returned.
38
     *                     Can't be provided with `projectKeyOrId`, or `issueTypeId`.
39
     * @param string $projectKeyOrId The ID or key of the project to filter results by.
40
     *                               Must be provided with `issueTypeId`.
41
     *                               Can't be provided with `issueId`.
42
     * @param string $issueTypeId The ID of the issue type to filter results by.
43
     *                            Must be provided with `projectKeyOrId`.
44
     *                            Can't be provided with `issueId`.
45
     * @param int $startAt The index of the first item to return in a page of results (page offset).
46
     * @param int $maxResults The maximum number of items to return per page.
47
     */
48
    public function getCustomFieldsConfigurations(
×
49
        Schema\ConfigurationsListParameters $request,
50
        ?array $id = null,
51
        ?array $fieldContextId = null,
52
        ?int $issueId = null,
53
        ?string $projectKeyOrId = null,
54
        ?string $issueTypeId = null,
55
        ?int $startAt = 0,
56
        ?int $maxResults = 100,
57
    ): Schema\PageBeanBulkContextualConfiguration {
58
        return $this->call(
×
59
            uri: '/rest/api/3/app/field/context/configuration/list',
×
60
            method: 'post',
×
61
            body: $request,
×
62
            query: compact('id', 'fieldContextId', 'issueId', 'projectKeyOrId', 'issueTypeId', 'startAt', 'maxResults'),
×
63
            success: 200,
×
64
            schema: Schema\PageBeanBulkContextualConfiguration::class,
×
65
        );
×
66
    }
67

68
    /**
69
     * Returns a "paginated" list of configurations for a custom field of a "type" created by a "Forge app"
70
     * 
71
     * The result can be filtered by one of these criteria:
72
     * 
73
     *  - `id`
74
     *  - `fieldContextId`
75
     *  - `issueId`
76
     *  - `projectKeyOrId` and `issueTypeId`
77
     * 
78
     * Otherwise, all configurations are returned
79
     * 
80
     * **"Permissions" required:** *Administer Jira* "global permission".
81
     * Jira permissions are not required for the Forge app that provided the custom field type.
82
     * 
83
     * @link https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/
84
     * @link https://developer.atlassian.com/platform/forge/
85
     * @link https://confluence.atlassian.com/x/x4dKLg
86
     * 
87
     * @param string $fieldIdOrKey The ID or key of the custom field, for example `customfield_10000`.
88
     * @param ?list<int> $id The list of configuration IDs.
89
     *                       To include multiple configurations, separate IDs with an ampersand: `id=10000&id=10001`.
90
     *                       Can't be provided with `fieldContextId`, `issueId`, `projectKeyOrId`, or `issueTypeId`.
91
     * @param ?list<int> $fieldContextId The list of field context IDs.
92
     *                                   To include multiple field contexts, separate IDs with an ampersand: `fieldContextId=10000&fieldContextId=10001`.
93
     *                                   Can't be provided with `id`, `issueId`, `projectKeyOrId`, or `issueTypeId`.
94
     * @param int $issueId The ID of the issue to filter results by.
95
     *                     If the issue doesn't exist, an empty list is returned.
96
     *                     Can't be provided with `projectKeyOrId`, or `issueTypeId`.
97
     * @param string $projectKeyOrId The ID or key of the project to filter results by.
98
     *                               Must be provided with `issueTypeId`.
99
     *                               Can't be provided with `issueId`.
100
     * @param string $issueTypeId The ID of the issue type to filter results by.
101
     *                            Must be provided with `projectKeyOrId`.
102
     *                            Can't be provided with `issueId`.
103
     * @param int $startAt The index of the first item to return in a page of results (page offset).
104
     * @param int $maxResults The maximum number of items to return per page.
105
     */
106
    public function getCustomFieldConfiguration(
×
107
        string $fieldIdOrKey,
108
        ?array $id = null,
109
        ?array $fieldContextId = null,
110
        ?int $issueId = null,
111
        ?string $projectKeyOrId = null,
112
        ?string $issueTypeId = null,
113
        ?int $startAt = 0,
114
        ?int $maxResults = 100,
115
    ): Schema\PageBeanContextualConfiguration {
116
        return $this->call(
×
117
            uri: '/rest/api/3/app/field/{fieldIdOrKey}/context/configuration',
×
118
            method: 'get',
×
119
            query: compact('id', 'fieldContextId', 'issueId', 'projectKeyOrId', 'issueTypeId', 'startAt', 'maxResults'),
×
120
            path: compact('fieldIdOrKey'),
×
121
            success: 200,
×
122
            schema: Schema\PageBeanContextualConfiguration::class,
×
123
        );
×
124
    }
125

126
    /**
127
     * Update the configuration for contexts of a custom field of a "type" created by a "Forge app"
128
     * 
129
     * **"Permissions" required:** *Administer Jira* "global permission".
130
     * Jira permissions are not required for the Forge app that created the custom field type.
131
     * 
132
     * @link https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/
133
     * @link https://developer.atlassian.com/platform/forge/
134
     * @link https://confluence.atlassian.com/x/x4dKLg
135
     * 
136
     * @param string $fieldIdOrKey The ID or key of the custom field, for example `customfield_10000`.
137
     */
138
    public function updateCustomFieldConfiguration(
×
139
        Schema\CustomFieldConfigurations $request,
140
        string $fieldIdOrKey,
141
    ): true {
142
        return $this->call(
×
143
            uri: '/rest/api/3/app/field/{fieldIdOrKey}/context/configuration',
×
144
            method: 'put',
×
145
            body: $request,
×
146
            path: compact('fieldIdOrKey'),
×
147
            success: 200,
×
148
            schema: true,
×
149
        );
×
150
    }
151
}
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