Fossil

Diff
Login

Diff

Differences From Artifact [a8082317a3]:

To Artifact [7bbc57258e]:


835
836
837
838
839
840
841
842

843
844
845
846
847
848
849
850
851


852
853
854
855
856
857
858
835
836
837
838
839
840
841

842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860







-
+









+
+








/*
** COMMAND: ticket
** Usage: %fossil ticket SUBCOMMAND ...
**
** Run various subcommands to control tickets
**
**     %fossil ticket show REPORTNR ?TICKETFILTER? ?-l|--limit LIMITCHAR?
**     %fossil ticket show (REPORTNR|REPORTTITLE) ?TICKETFILTER? ?-l|--limit LIMITCHAR?
**
**         Run the the ticket report, identified by the report number
**         used in the gui. The data is written as flat file on stdout,
**         using "," as separator. The seperator "," can be changed using
**         the -l or --limit option.
**         If TICKETFILTER is given on the commandline, the query is
**         limited with a new WHERE-condition.
**           example:  Report lists a column # with the uuid
**                     TICKETFILTER may be [#]='uuuuuuuuu'
**         Instead of the report number its possible to use the report
**         title (please quote the string, if it contains whitespace).
**
**     %fossil ticket set TICKETUUID FIELD VALUE ?FIELD VALUE ... ?
**
**         change ticket identified by TICKETUUID and set the value of
**         field FIELD to VALUE. Valid field descriptions are:
**            status, type, severity, priority, resolution,
**            foundin, private_contact, resolution, title or comment
888
889
890
891
892
893
894
895

896
897
898
899
900

901
902
903
904
905

906
907
908
909
910
911
912
890
891
892
893
894
895
896

897
898
899
900
901

902
903
904
905
906

907
908
909
910
911
912
913
914







-
+




-
+




-
+







    n = strlen(g.argv[2]);
    if( n==1 && g.argv[2][0]=='s' ){
      usage("ticket show|set|add");
    }else if( strncmp(g.argv[2],"show",n)==0 ){
      if( g.argc==3 ){
        usage("ticket show REPORTNR");
      }else{
        int rn;
        const char *zRep = 0;
        const char *zSep = 0;
        const char *zFilterUuid = 0;

        zSep = find_option("limit","l",1);
        rn = atoi(g.argv[3]);
        zRep = g.argv[3];
        if( g.argc>4 ){
          zFilterUuid = g.argv[4];
        }

        rptshow( rn, zSep, zFilterUuid );
        rptshow( zRep, zSep, zFilterUuid );

      }
    }else{
      enum { set,add,err } eCmd = err;
      int i;
      int rid;
      const char *zTktUuid;