
You still can operate with typed objects instead of raw \stdClass' ones If you got some information from API with specific request using, say, \Badoo\Jira\REST\ClientRaw, ::fromStdClass() method is used by all wrapper classes for initialization on data from API. \Badoo\Jira\Version::forProject() gives you all versions created in specific project.\Badoo\Jira\CustomField::forIssue() gives you a custom field object related to an issue.::for() static methods look for all items somehow related to Instance. \Badoo\Jira\Version::byName() gives you a JIRA Version by its name.\Badoo\Jira\User::byEmail() gives you a JIRA User by its email.::by() static methods provide you with single or multiple objects identified by some single criteria. This allows you to control where exactly you will get the \Badoo\Jira\REST\Exception on API errors if you need it. ::get() static methods are about getting a single object by its ID with immediate request to API inside method. \Badoo\Jira\User::search() where JIRA looks through several user attributes trying to find you a user. for \Badoo\Jira\Issue::search() where you use complex JQL queries and ::search() static methods are about multi-criteria search of instances. For convenience we decided to follow next convention: Names of this methods have similar structure. $users = \ Badoo\ Jira\ User::search() // looks for all users with login, email or display name similar to pattern $ Version = \ Badoo\ Jira\ Version::byName(, ) // looks for version with specific name in project $components = \ Badoo\ Jira\ Component::forProject() // lists all components available in project Let's consider you created custom field class (or classes) inside \Example\CustomField namespace. 'Checkboxes', 'Number Field', 'Radio Buttons', 'Select List (single choice)' and so on. In this section we consider you already created a class for regular custom field,
#Jira client database management generator
You will find both quickstart and detailed documentation on generator there. You can generate a custom field with special generator stored in this repositroy.įor more information follow CFGenerator subdirectory and open README.md file. $ Issue = \ Badoo\ Jira\ Issue:: fromStdClass( $ IssueInfo, ) Custom fields creation time or assignee - object will still load it from API on demand. It will store key, summary and description field values in internal cache // When you need some additional data, e.g. $ IssueInfo-> fields-> description = $db_data $ IssueInfo-> fields-> summary = $db_data First, create an \stdClass object to mimic API response: $ IssueInfo = new \stdClass() 'description' => 'description of example issue',

Consider you get this data from your database: $db_data = [
