original_docstring: Change the status of an issue
docstring: Change the status of an issue
docstring_tokens: Change the status of an issue
code: def change_status(client, issue_key, status):
      """Change the status of an issue"""
      print('Fetching possible transitions...')
      transitions = client.get_issue_transitions(issue_key)
      if len(transitions) == 0:
          print('No transitions found for {}'.format(issue_key))
          return
  
      if status is None:
          for index, transition in enumerate(transitions):
              print('{}: {}'.format(index, transition))
          index = click.prompt('Select a transition', type=int)
          if index < 0 or index >= len(transitions):
              print('No transitions match "{}"'.format(index))
              return
      else:
          index = -1
          for idx, transition in enumerate(transitions):
              if transition.name.lower() == status.lower():
                  index = idx
          if index < 0:
              print('No transitions match "{}"'.format(status))
              return
  
      transition = transitions[index]
      if client.change_status(issue_key, transition.id):
          print('Okay, the status for {} is now "{}".'.format(issue_key, transition))
      else:
          print('There was an issue saving the new status as "{}"'.format(transition))
code_tokens: def change_status ( client , issue_key , status ) : print ( 'Fetching possible transitions...' ) transitions = client . get_issue_transitions ( issue_key ) if len ( transitions ) == 0 : print ( 'No transitions found for {}' . format ( issue_key ) ) return if status is None : for index , transition in enumerate ( transitions ) : print ( '{}: {}' . format ( index , transition ) ) index = click . prompt ( 'Select a transition' , type = int ) if index < 0 or index >= len ( transitions ) : print ( 'No transitions match "{}"' . format ( index ) ) return else : index = - 1 for idx , transition in enumerate ( transitions ) : if transition . name . lower ( ) == status . lower ( ) : index = idx if index < 0 : print ( 'No transitions match "{}"' . format ( status ) ) return transition = transitions [ index ] if client . change_status ( issue_key , transition . id ) : print ( 'Okay, the status for {} is now "{}".' . format ( issue_key , transition ) ) else : print ( 'There was an issue saving the new status as "{}"' . format ( transition ) )
short_docstring: Change the status of an issue
short_docstring_tokens: Change the status of an issue
comment: """Change the status of an issue"""