Ejemplo n.º 1
0
  private void defineValidateAction(NewController controller) {
    NewAction action =
        controller
            .createAction("validate")
            .setDescription("Check credentials.")
            .setSince("3.3")
            .setHandler(ServletFilterHandler.INSTANCE)
            .setResponseExample(Resources.getResource(this.getClass(), "example-validate.json"));

    RailsHandler.addFormatParam(action);
  }
Ejemplo n.º 2
0
  private static void defineBulkChangeAction(NewController controller) {
    WebService.NewAction action =
        controller
            .createAction(BULK_CHANGE_ACTION)
            .setDescription(
                "Bulk change on issues. Requires authentication and User role on project(s)")
            .setSince("3.7")
            .setHandler(RailsHandler.INSTANCE)
            .setPost(true);

    action
        .createParam("issues")
        .setDescription("Comma-separated list of issue keys")
        .setRequired(true)
        .setExampleValue(
            "01fc972e-2a3c-433e-bcae-0bd7f88f5123,01fc972e-2a3c-433e-bcae-0bd7f88f9999");
    action
        .createParam("actions")
        .setDescription(
            "Comma-separated list of actions to perform. Possible values: assign | set_severity | plan | do_transition")
        .setRequired(true)
        .setExampleValue("assign,plan");
    action
        .createParam("assign.assignee")
        .setDescription(
            "To assign the list of issues to a specific user (login), or un-assign all the issues")
        .setExampleValue("john.smith");
    action
        .createParam("set_severity.severity")
        .setDescription("To change the severity of the list of issues")
        .setExampleValue(Severity.BLOCKER)
        .setPossibleValues(Severity.ALL);
    action
        .createParam("plan.plan")
        .setDescription(
            "To plan the list of issues to a specific action plan (key), or unlink all the issues from an action plan")
        .setExampleValue("3f19de90-1521-4482-a737-a311758ff513");
    action
        .createParam("do_transition.transition")
        .setDescription("Transition")
        .setExampleValue("reopen")
        .setPossibleValues(DefaultTransitions.ALL);
    action
        .createParam("comment")
        .setDescription("To add a comment to a list of issues")
        .setExampleValue("Here is my comment");
    action
        .createParam("sendNotifications")
        .setDescription("Available since version 4.0")
        .setDefaultValue("false")
        .setPossibleValues("true", "false");
    RailsHandler.addFormatParam(action);
  }
Ejemplo n.º 3
0
  private static void defineChangelogAction(NewController controller) {
    WebService.NewAction action =
        controller
            .createAction(CHANGELOG_ACTION)
            .setDescription("Display changelog of an issue")
            .setSince("4.1")
            .setHandler(RailsHandler.INSTANCE)
            .setResponseExample(Resources.getResource(IssuesWs.class, "example-changelog.json"));

    action
        .createParam("issue")
        .setDescription("Key of the issue")
        .setRequired(true)
        .setExampleValue("5bccd6e8-f525-43a2-8d76-fcb13dde79ef");
    RailsHandler.addFormatParam(action);
  }
Ejemplo n.º 4
0
  private static void defineEditCommentAction(NewController controller) {
    WebService.NewAction action =
        controller
            .createAction(EDIT_COMMENT_ACTION)
            .setDescription("Edit a comment. Requires authentication and User role on project")
            .setSince("3.6")
            .setHandler(RailsHandler.INSTANCE)
            .setPost(true);

    action
        .createParam("key")
        .setDescription("Key of the comment")
        .setRequired(true)
        .setExampleValue("392160d3-a4f2-4c52-a565-e4542cfa2096");
    action.createParam("text").setDescription("New comment").setExampleValue("blabla2...");
    RailsHandler.addFormatParam(action);
  }
Ejemplo n.º 5
0
  private static void defineAddCommentAction(NewController controller) {
    WebService.NewAction action =
        controller
            .createAction(ADD_COMMENT_ACTION)
            .setDescription(
                "Add a comment. Requires authentication and Browse permission on project")
            .setSince("3.6")
            .setHandler(RailsHandler.INSTANCE)
            .setPost(true);

    action
        .createParam("issue")
        .setDescription("Key of the issue")
        .setRequired(true)
        .setExampleValue("5bccd6e8-f525-43a2-8d76-fcb13dde79ef");
    action.createParam("text").setDescription("Comment").setExampleValue("blabla...");
    RailsHandler.addFormatParam(action);
  }